blob: a02e8d9c1dd713d431db3f5586bb77a49390852d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
-- !!! ds005 -- mappairs from SLPJ Ch 5'
--
-- this simply tests a "typical" example
module ShouldCompile where
-- from SLPJ, p 78
mappairs f [] ys = []
mappairs f (x:xs) [] = []
mappairs f (x:xs) (y:ys) = f x y : mappairs f xs ys
-- from p 80
mappairs' f [] ys = []
mappairs' f x [] = []
mappairs' f (x:xs) (y:ys) = f x y : mappairs' f xs ys
|