summaryrefslogtreecommitdiff
path: root/tests/cfold.ur
blob: 0fcf9d6013a1253f893a5b1383c25730f20a88f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
con currier = fold (fn nm => fn t => fn acc => t -> acc) {}

con greenCurryIngredients :: {Type} = []
con greenCurry = currier greenCurryIngredients
val greenCurry : greenCurry = {}

con redCurryIngredients = [A = int, B = string]
con redCurry = currier redCurryIngredients
val redCurry : redCurry = fn x : int => fn y : string => {}

con yellowCurryIngredients = [A = string, B = int, C = float]
con yellowCurry = currier yellowCurryIngredients
val yellowCurry : yellowCurry = fn x => fn y => fn z => {}

val main = yellowCurry