Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun insEverywhere e nil = [[e]]
- | insEverywhere e (y::ys) =
- (e::y::ys) :: (map (fn u => y::u) (insEverywhere e ys));
- fun appendAll nil = nil
- | appendAll (z::zs) = z @ (appendAll zs)
- fun perm nil = [ nil ]
- | perm (x::xs) =
- appendAll (map (insEverywhere x) (perm xs));
- perm[1,2,3];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement