Mercurial > urweb
comparison tests/cfold.lac @ 71:6431b315a1e3
Elaborate efold
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 26 Jun 2008 11:09:30 -0400 |
parents | 2e0f3b21fb85 |
children |
comparison
equal
deleted
inserted
replaced
70:2e0f3b21fb85 | 71:6431b315a1e3 |
---|---|
1 con currier = fold (fn nm => fn t => fn acc => t -> acc) {} | 1 con currier = fold (fn nm => fn t => fn acc => t -> acc) {} |
2 | 2 |
3 con greenCurry = currier [] | 3 con greenCurryIngredients :: {Type} = [] |
4 con greenCurry = currier greenCurryIngredients | |
4 val greenCurry : greenCurry = {} | 5 val greenCurry : greenCurry = {} |
5 | 6 |
6 con redCurry = currier [A = int, B = string] | 7 con redCurryIngredients = [A = int, B = string] |
8 con redCurry = currier redCurryIngredients | |
7 val redCurry : redCurry = fn x : int => fn y : string => {} | 9 val redCurry : redCurry = fn x : int => fn y : string => {} |
8 | 10 |
9 con yellowCurry = currier [A = string, B = int, C = float] | 11 con yellowCurryIngredients = [A = string, B = int, C = float] |
12 con yellowCurry = currier yellowCurryIngredients | |
10 val yellowCurry : yellowCurry = fn x => fn y => fn z => {} | 13 val yellowCurry : yellowCurry = fn x => fn y => fn z => {} |
11 | 14 |
12 val main = yellowCurry | 15 val main = yellowCurry |