# From swap/test/list/last.n3
@prefix : <#>.
@prefix list: <http://www.w3.org/2000/10/swap/list#>.

{ ( 1 2 3 4 5 6 ) list:last 6 } => { :test1 a :SUCCESS }.

{ ( 1 2 3 4 5 "Z" ) list:last "Z" } => { :test2 a :SUCCESS }.

{ ( "wrong"  "WongAgain"  "Success" ) list:last ?x }=>{ :test3 :isa ?x}.

:thing1 :prop1 ( :test5a :test5b :test5c ) .
{ [ is :prop1 of :thing1 ] list:last ?item } => { ?item a :SUCCESS } .

( :foo :bar :baz ) :prop2 :test6a .
( :foo ) :prop2 :test6b .
( :bar :baz ) :prop2 :trap4 .
{ ?a_list list:last :foo .
  ?a_list :prop2 ?thing } => { ?thing a :SUCCESS } .
