Why maplist applies only on the first list of list-of-lists ?
%% given K:V match return V2 specified by K2
kv2kv(K:V,ResK,HL,Res) :- writeln(HL), member(K:V, HL), member(ResK:Res, HL).
find(K:V, FSL, S) :- maplist(kv2kv(K:V,word),FSL, S).
example :
?- fs7(L).
L = [[word:we,pos:pron,dep:nsubj],[word:are,pos:aux,dep:root],[word:about,pos:adj,dep:acomp],[word:to,pos:part,dep:aux],[word:finish,pos:verb,dep:xcomp],[word:the,pos:det,dep:det],[word:game,pos:noun,dep:dobj]].
?- fs7(L),find(dep:root,L,R).
[word:we,pos:pron,dep:nsubj]
false.
As a quick question the kv2kv clause uses two member-queries, i suppose it checks the list twice is there a better solution.