Skip to content

Instantly share code, notes, and snippets.

@lessless
Created July 2, 2014 06:30
Show Gist options
  • Select an option

  • Save lessless/15a726fb52b1b2598d93 to your computer and use it in GitHub Desktop.

Select an option

Save lessless/15a726fb52b1b2598d93 to your computer and use it in GitHub Desktop.
{-
Prelude> :t [['a','b','c'],['d','e']]
[['a','b','c'],['d','e']] :: [[Char]]
Prelude> head [['a','b','c'],['d','e']]
"abc"
Prelude> head (head [['a','b','c'],['d','e']])
'a'
Prelude> head [[]]
[]
1. Rewrite the previous list literals using only (:) and the empty list constructor [].
-}
[['a','b','c'],['d','e']] - (('a' : 'b' : 'c' : []) : []) : (('d' : 'e' : []) : []) : []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment