comparison src/core_util.sml @ 69:8e9920db39f2

Corify cfold
author Adam Chlipala <adamc@hcoop.net>
date Thu, 26 Jun 2008 09:53:52 -0400
parents 0a5c312de09a
children 8b611ecc5f2d
comparison
equal deleted inserted replaced
68:c1e21ab42896 69:8e9920db39f2
141 S.bind2 (mfc ctx c1, 141 S.bind2 (mfc ctx c1,
142 fn c1' => 142 fn c1' =>
143 S.map2 (mfc ctx c2, 143 S.map2 (mfc ctx c2,
144 fn c2' => 144 fn c2' =>
145 (CConcat (c1', c2'), loc))) 145 (CConcat (c1', c2'), loc)))
146 | CFold (k1, k2) =>
147 S.bind2 (mfk k1,
148 fn k1' =>
149 S.map2 (mfk k2,
150 fn k2' =>
151 (CFold (k1', k2'), loc)))
146 in 152 in
147 mfc 153 mfc
148 end 154 end
149 155
150 fun mapfold {kind = fk, con = fc} = 156 fun mapfold {kind = fk, con = fc} =