pascalabcnet/TestSamples/Haskell_Samples/Map.hs
Бондарев Иван e6e67c193c initial commit
2015-05-14 21:35:07 +02:00

14 lines
268 B
Haskell

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 [1..10]));
(print(map ff [1,3..10]));
(print(map ff []));
(print 3);
}