Mercurial > urweb
view tests/cfold.ur @ 2063:83bdb52962c9
Check realloc's return code to prevent segfault on out of memoty condition
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Sat, 23 Aug 2014 11:59:34 +0000 |
parents | 71bafe66dbe1 |
children |
line wrap: on
line source
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