From: Jonathan R. <jon...@gm...> - 2005-11-25 03:49:57
|
IMO, Array.filter should return an array of the same size. Reason: whilst arrays are mutable, they are not resizable. Then it's just a specialised Array.map. let filter pred =3D map (fun elt -> if pred elt then Some elt else None);; find_all then builds a list by unwrapping all values Some 'a from filter. My 2c, Jonathan |