Question : get first char from string haskell
Answered by : marton
Prelude> take 1 "hello"
"h"
Prelude> take 1 ""
""
Prelude> head "hello"
'h'
Prelude> head ""
*** Exception: Prelude.head: empty list
Source : https://www.reddit.com/r/haskell/comments/11oze3/get_first_char_of_a_string/ | Last Update : Mon, 05 Oct 20