Mercurial > urweb
comparison src/list_util.sml @ 23:bfa2e9ae4df8
Tree-shaking
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 08 Jun 2008 17:15:09 -0400 |
parents | 38bf996e1c2e |
children | 4ab19c19665f |
comparison
equal
deleted
inserted
replaced
22:d8850cc06d24 | 23:bfa2e9ae4df8 |
---|---|
58 | S.Continue (t', s) => S.Continue (h' :: t', s) | 58 | S.Continue (t', s) => S.Continue (h' :: t', s) |
59 in | 59 in |
60 mf | 60 mf |
61 end | 61 end |
62 | 62 |
63 fun search f = | |
64 let | |
65 fun s ls = | |
66 case ls of | |
67 [] => NONE | |
68 | h :: t => | |
69 case f h of | |
70 NONE => s t | |
71 | v => v | |
72 in | |
73 s | |
74 end | |
75 | |
63 end | 76 end |