next up previous
Next: second/2 Up: Recursion and lists Previous: Lists

first/2

A predicate, which when supplied with a list a first argument, returns the first element of the list as its second argument:[*]
first([First|Rest], First).


Steve Harlow 2001-11-26