Lists
[] is the empty list
. predicate is like Scheme’s cons:?- A = .(1, .(2, .(3, []))). A=[1, 2, 3]
[…] shorthand syntax:?- A = [1,2,3] A=[1, 2, 3]
[E1...|Tail] notation?- A = [1,2|3]. A=[1, 2|3]?- A = [1,2|[3]]. A=[1, 2, 3]
Previous slide
Next slide
Back to first slide
View graphic version