Fix list destructuring multiple-evaluation bug

This commit is contained in:
2020-12-01 16:25:59 -07:00
parent 0f30d5d2e7
commit f033b0cf7b
2 changed files with 7 additions and 4 deletions

View File

@@ -1,7 +1,6 @@
(defun main []
// Day 1
// TODO implement unless
// TODO list destructuring a funcall results in double evaluation
(let [p (pairWithSum 2020 [1721 979 366 299 675 1456])]
(when !(and (has p 1721) (has p 299))
(throw "pairWithSum is broken")))