From: Mart Lubbers Date: Tue, 22 Sep 2015 19:22:48 +0000 (+0200) Subject: no idea why tuple doesn't work... X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=71d77d3e067367fa1025f922648fbe91ae865704;p=ap2015.git no idea why tuple doesn't work... --- diff --git a/a3/mart/skeleton3a.icl b/a3/mart/skeleton3a.icl index 709c60c..b741436 100644 --- a/a3/mart/skeleton3a.icl +++ b/a3/mart/skeleton3a.icl @@ -240,13 +240,13 @@ instance map1 [] where instance map1 Tree where map1 f t = toTree (map2 (map1 map0) (map1 (map2 f (map2 (map1 f) (map1 f)))) (fromTree t)) -//instance map2 (a, b) | map1 a & map1 a where -// map2 f1 f2 t = toTup (map1 (map2 f1 f2) (fromTup t)) +instance map2 (,) where + map2 f1 f2 t = toTup (map1 (map2 f1 f2) (fromTup t)) Start = ( map1 fac aTree, map1 fac aList, - //map2 fac fac (aList, aTree), + map2 fac fac (aList, aTree), map1 (\x.(x, fac x)) aList ) where