[ create a new paste ] login | about

Link: http://codepad.org/YcXodrXr    [ raw code | output | fork ]

Haskell, pasted on Feb 1:
1
2
3
4
5
6
7
-- An online type checker for the Haskell programming language (see haskell.org).

inverte :: [a] -> [a]
inverte [] = []
inverte (x:xs) = inverte xs ++ [x]

main = putStrLn (show  (inverte [1,2,3,4]) )


Output:
1
[4,3,2,1]


Create a new paste based on this one


Comments: