Process arbitrarily large lists without explicit recursion or abstract list functions?
- by Erica Xu
This is one of the bonus questions in my assignment.
The specific questions is to see the input list as a set and output all subsets of it in a list. We can only use cons, first, rest, empty?, empty, lambda, and cond. And we can only define exactly once.
But after a night's thinking I don't see it possible to go through the arbitrarily long list without map or foldr.
Is there a way to perform recursion or alternative of recursion with only these functions?