comparison lib/ur/list.ur @ 2226:e10881cd92da

Merge.
author Ziv Scully <ziv@mit.edu>
date Fri, 27 Mar 2015 11:26:06 -0400
parents d9f918b79b5a
children
comparison
equal deleted inserted replaced
2225:6262dabc08d6 2226:e10881cd92da
214 (y, st) => fold (y :: ls') st ls 214 (y, st) => fold (y :: ls') st ls
215 in 215 in
216 fold [] 216 fold []
217 end 217 end
218 218
219 fun mem [a] (_ : eq a) (x : a) =
220 let
221 fun mm ls =
222 case ls of
223 [] => False
224 | y :: ls => y = x || mm ls
225 in
226 mm
227 end
228
219 fun find [a] f = 229 fun find [a] f =
220 let 230 let
221 fun find' ls = 231 fun find' ls =
222 case ls of 232 case ls of
223 [] => None 233 [] => None