Created
October 5, 2009 03:25
-
-
Save ldfallas/201840 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rec MultiPartition aList (p:'a -> 'a -> bool) results = | |
match aList with | |
| x::rest -> | |
let equivalent,newRest = | |
List.partition | |
(fun e -> p x e) | |
rest | |
in MultiPartition newRest p ((x::equivalent)::results) | |
| [] -> results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment