partition : ('a -> bool) -> 'a list -> 'a list * 'a list
- partition (fn i => i mod 2 = 0) [1,2,3,4,5,6,7,8,9]; > val it = ([2, 4, 6, 8], [1, 3, 5, 7, 9]) : int list * int list - partition (fn _ => true) [1,2,3]; > val it = ([1, 2, 3], []) : int list * int list - partition (fn _ => raise Fail "") ([]:int list); > val it = ([], []) : int list * int list - partition (fn _ => raise Fail "") [1]; ! Uncaught exception: ! Fail ""