Get First Char From String Haskell

[Solved] Get First Char From String Haskell | Haskell - Code Explorer | yomemimo.com
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

Answers related to get first char from string haskell

Code Explorer Popular Question For Haskell