bsc-leon-vatthauer/slides/code-examples/example.hs
2024-01-03 19:51:04 +01:00

6 lines
103 B
Haskell

hd :: [a] -> a
hd [] = error "empty list"
hd (x : _) = x
main :: IO ()
main = print (hd []::[String])