Write a purely functional Scheme function that returns a list of all permutations of a given list.

Question:

Write a purely functional Scheme function that returns a list of all permutations of a given list. For example, given (a b c), it should return ((a b c) (b a c) (b c a) (a c b) (c a b) (c b a)) (in some order).

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Programming Language Pragmatics

ISBN: 9780124104099

4th Edition

Authors: Michael L. Scott

Question Posted: