For example:
?- position([[b,c,f],[a,d,g],[h,e]],c,P) P=1 ?- position([[b,c,f],[a,d,g],[h,e]],g,P) P=2
I\'ve been looking at the nth0/3 pred