Basic types, Lists, Trees, Higher-order functions
Basic types, Lists, Trees, Higher-order functions
Basic types, Lists, Trees, Higher-order functions
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
List constructors: [], nil and ::<strong>Lists</strong> are generated as follows:• the empty list is a list, designated [] or nil• if x is an element and xs is a list,then so is x :: xs(type consistency):: associate to the right, i.e. x 1 ::x 2 ::xs means x 1 ::(x 2 ::xs)::❅ ❅❅x 1 ::x 2❅ ❅❅xsGraph for x 1 ::x 2 ::xsc○Michael R. Hansen, Spring 2005 – p.17/59