You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maybe I'm missing an obvious alternative form, but in my solution for the exercise you need the "head" from the unpacking in the second case in the pattern match (which is discarded in the template).:
(defun subsets
(('()) '(()))
(((cons head tail))
(let ((rest (subsets tail)))
(++ rest (lists:map
(lambda (r) (cons head r))
rest)))))
Also, I think that using ++ instead of append might be useful to avoid loading that function.
The text was updated successfully, but these errors were encountered:
maybe I'm missing an obvious alternative form, but in my solution for the exercise you need the "head" from the unpacking in the second case in the pattern match (which is discarded in the template).:
Also, I think that using ++ instead of append might be useful to avoid loading that function.
The text was updated successfully, but these errors were encountered: