[ create a new paste ] login | about

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

johannes - Haskell, pasted on Feb 4:
1
2
3
4
5
6
7
8
9
10
module Main where

-- [2**x | x <- [1 .. 10], x > 5]
ls = do
    x <- filter (>5) [1 .. 10]
    let y = 2^x
    return y

main :: IO ()
main = print ls


Output:
1
[64,128,256,512,1024]


Create a new paste based on this one


Comments: