Data update
This commit is contained in:
parent
0df55f9f24
commit
aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions
5
Task/Permutations/Standard-ML/permutations.ml
Normal file
5
Task/Permutations/Standard-ML/permutations.ml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
fun interleave x [] = [[x]]
|
||||
| interleave x (y::ys) = (x::y::ys) :: (List.map (fn a => y::a) (interleave x ys))
|
||||
|
||||
fun perms [] = [[]]
|
||||
| perms (x::xs) = List.concat (List.map (interleave x) (perms xs))
|
||||
Loading…
Add table
Add a link
Reference in a new issue