Answers for "get first char from string haskell"

1

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
Posted by: Guest on September-28-2020
1

get first char from string haskell

Prelude> take 3 "Hello"
"Hel"
Posted by: Guest on September-28-2020

Code answers related to "get first char from string haskell"

Browse Popular Code Answers by Language