comparison src/list_util.sml @ 6:38bf996e1c2e

Check for leftover kind unifs
author Adam Chlipala <adamc@hcoop.net>
date Sat, 26 Jan 2008 16:44:39 -0500
parents 258261a53842
children bfa2e9ae4df8
comparison
equal deleted inserted replaced
5:258261a53842 6:38bf996e1c2e
40 end 40 end
41 in 41 in
42 mf i [] 42 mf i []
43 end 43 end
44 44
45 structure S = Search
46
47 fun mapfold f =
48 let
49 fun mf ls s =
50 case ls of
51 nil => S.Continue (nil, s)
52 | h :: t =>
53 case f h s of
54 S.Return x => S.Return x
55 | S.Continue (h', s) =>
56 case mf t s of
57 S.Return x => S.Return x
58 | S.Continue (t', s) => S.Continue (h' :: t', s)
59 in
60 mf
61 end
62
45 end 63 end