pascalabcnet/TestSamples/Haskell_Samples/Map1.hs

11 lines
169 B
Haskell
Raw Normal View History

2015-05-14 22:35:07 +03:00
module Main where
ff x = x+1
map a [] = []
map a h:t = (a h):(map a t)
main = do {
(print(map ff [1,3,8,11]));
(print(map ff []));
}