Let say I have a list
[[a,b,c],[d,e,f],[g,h,i]]
I want to get every consecutive element and put it in another predicate.
func(a,b).
func(b,c).
func(d,e).
func(e,f).
func(g,h).
func(h,i).
I already wrote the predicate I want to put in, but I'm having a hard time getting two elements from the list of lists.
flatten/2
list to ease taking out two cons. elements as @joel76 suggested – ony