get first char from string haskell
Prelude> take 1 "hello" "h" Prelude> take 1 "" "" Prelude> head "hello" 'h' Prelude> head "" *** Exception: Prelude.head: empty list
Source: www.reddit.com
Prelude> take 1 "hello" "h" Prelude> take 1 "" "" Prelude> head "hello" 'h' Prelude> head "" *** Exception: Prelude.head: empty list