Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plus :: Double -> Double -> Double
- plus x y = x +y
- b1 :: [Double]
- b1=[31,2,756,3]
- b2 = [2,6..100]
- -- init is everything except last one!
- --EX. 1
- hello :: String -> String
- hello n = "Hello "++n ++" Great!!!"
- --Ex. 2
- vol :: Num a => a ->a -> a -> a
- vol x y z = x*y*z
- --Ex. 3a
- doubleMe :: Num a => a -> a
- doubleMe a = 2*a
- --Ex. 3b
- myNumbers :: [Integer]
- myNumbers = [11,12..99]
- --Ex. 3c
- map doubleMe myNumbers --on Terminal
- --Ex. 3d
- mod13 :: [Integer]
- mod13 list =
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement