Haskell List

  • ++ and : for concatenation
  • head, tail, init, last
  • reverse
  • take num, drop num
  • null
  • elem
    • elem 'x' ['a', 'b', 'c']
  • concat
    • concat [[3, 1], [2], [], [5, 10]]
  • Linear time function
    • length
    • !! index
  • range
    • [1, 3 .. 20]
      • [1,3,5,7,9,11,13,15,17,19]
    • [10, 9 .. 1]
      • [10,9,8,7,6,5,4,3,2,1]
      • [0 .. ] infinite lists