Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - Lists
- [2^n | n <- [1..10]]
- >[2,4,8,16,32,64,128,256,512,1024]
- [n | n <- [1..10], n `mod` 2 == 0]
- >[2,4,6,8,10]
- [c | c <- "arthur", not ( c `elem` "aeiou")]
- >"rthr"
- - Tuples
- let numbers = [1..5]
- let nomes = ["arthur","batatinha","cuscuz","mama","churros"]
- zip numbers nomes
- >[(1,"arthur"),(2,"batatinha"),(3,"cuscuz"),(4,"mama"),(5,"churros")]
- [(fst q, fst p) | q <- pairs, p <-pairs]
- let pairs = zip numbers nomes
Add Comment
Please, Sign In to add comment