View difference between Paste ID: GgWjRTE6 and y2Jz9E1u
SHOW: | | - or go back to the newest paste.
1
A2)a)
2
3
mapList :: (Int -> Int) -> List -> List
4
mapList _ [] = []
5
mapList f (x:xs) = f x : maplist f xs
6
7
b)
8
negateList :: List -> List
9-
neagteList mapList (x = x -1)
9+
neagteList mapList (x = x - 1) xs