comparison src/core_util.sml @ 73:8b611ecc5f2d

Corify efold
author Adam Chlipala <adamc@hcoop.net>
date Thu, 26 Jun 2008 11:32:29 -0400
parents 8e9920db39f2
children 275aaeb73f1f
comparison
equal deleted inserted replaced
72:0ee10f4d73cf 73:8b611ecc5f2d
276 S.bind2 (mfc ctx field, 276 S.bind2 (mfc ctx field,
277 fn field' => 277 fn field' =>
278 S.map2 (mfc ctx rest, 278 S.map2 (mfc ctx rest,
279 fn rest' => 279 fn rest' =>
280 (EField (e', c', {field = field', rest = rest'}), loc))))) 280 (EField (e', c', {field = field', rest = rest'}), loc)))))
281 | EFold k =>
282 S.map2 (mfk k,
283 fn k' =>
284 (EFold k', loc))
281 in 285 in
282 mfe 286 mfe
283 end 287 end
284 288
285 fun mapfold {kind = fk, con = fc, exp = fe} = 289 fun mapfold {kind = fk, con = fc, exp = fe} =