Skip to content

Instantly share code, notes, and snippets.

@lessless
Created July 2, 2014 06:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lessless/15a726fb52b1b2598d93 to your computer and use it in GitHub Desktop.
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