This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: as [XL] where X is a list item and L is a list. • The dot: – is a functor for representing lists with two arguments, the head and the tail of a list – A list of one element [a] is [a ] implemented in Prolog as .(a, ) – [a, b] is .(a, .(b, )) • Note [a, b, c] is not the same as [a, [b,c]] York University CSE 3401 3 05_Lists Lists (cont.) . a . b . c York University CSE 3401 4 [a, b, c] is .(a, .(b, .(c, ))) 05_Lists Lists (cont.) . a . . b . C York University CSE 3401 5 [a, [b, c]] is .(a, L) where L is [[b,c]] having [b,c] as its head and as tail 05_Lists...
View
Full Document
 Fall '11
 Movahedi
 Computer Science, Logic, C Programming, Musical notation, York University CSE

Click to edit the document details