All pastes #56044 Raw Edit

Mine

public text v1 · immutable
#56044 ·published 2006-05-15 21:54 UTC
rendered paste body
myMap :: (a -> b) -> [a] -> [b]
myMap f lst = myReverse (iter [] lst)
    where
        iter lst1 [] = lst1
        iter lst1 (x:xs) = iter (f x : lst1) xs

myReverse :: [a] -> [a]
myReverse lst = iter [] lst
    where
        iter lst1 [] = lst1
        iter lst1 (x:xs) = iter (x:lst1) xs