Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- measure :: [a] -> Integer
- measure [] = 0
- measure (h:r) = 1 + measure r
- GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help
- Loading package base ... linking ... done.
- Prelude> let swap (a,b) = (b,a)
- Prelude> swap("hello", "world")
- ("world","hello")
- Prelude> swap(1,2)
- (2,1)
- Prelude> swap("hello",2)
- (2,"hello")
Add Comment
Please, Sign In to add comment