Closed MichelSc closed 3 days ago
list:memberAt does not work for a list from a ttl file.
list:memberAt
I have a ttl file with 1 list :
:list1 :list ( :a :b :c ).
I have a n3 file, applying list:memberAt on that list:
{ :list1 :list ?l. (?l ?index) list:memberAt :b. (?l 1) list:memberAt ?elem. } => { :result :index ?index. :result :elem ?elem. }.
Running this query gives nothing: NOK. I expect to receive
ns1:result ns1:index 1 . ns1:result ns1:elem ns1:b.
If I put the list statement in the n3 file, I get the expected result.
If I rewrite list:memberAt as follows, then the list statement from a ttl file works.
{ ( ?list 0 ) :memberAt ?member. } <= { ?list rdf:first ?member. }. { ( ?list ?index ) :memberAt ?member. } <= { ?list rdf:rest ?tail. ( ?tail ?index-minus1 ) :memberAt ?member. ( ?index-minus1 1 ) math:sum ?index. }.
Note that the other list builtins work OK for list from ttl files.
Seems related to #120 and #117, where statements in ttl files give a different result from the same statements n3 files.
Should now be working fine in EYE v10.30.3 (2024-11-13). A few other list: built-ins were also fixed.
EYE v10.30.3 (2024-11-13)
list:
Works ok with 10.30.3.
Thanks
list:memberAt
does not work for a list from a ttl file.I have a ttl file with 1 list :
I have a n3 file, applying
list:memberAt
on that list:Running this query gives nothing: NOK. I expect to receive
If I put the list statement in the n3 file, I get the expected result.
If I rewrite
list:memberAt
as follows, then the list statement from a ttl file works.Note that the other list builtins work OK for list from ttl files.
Seems related to #120 and #117, where statements in ttl files give a different result from the same statements n3 files.