We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e.g.
(let [p1 v1 p2 v2] body)
desuger to
(match v1 (p1 → (match v2 (p2 → body))))
this is quite useful when v1 and v2 are just called recursively inside the function itself.
v1
v2
The text was updated successfully, but these errors were encountered:
more generally, to support recursive letbindings, should introduce a new special form letrec
letrec
(letrec [ev? (λ n → (if (zero? n) true (od? (dec n)))) od? (λ n → (if (zero? n) false (ev? (dec n))))] (begin (print (bool2str (ev? 11))) (print (bool2str (ev? 12))) (print (bool2str (od? 11))) (print (bool2str (od? 12)))))
(let [ev? (λ n → (match (λ n → (if (zero? n) false (ev? (dec n)))) (od? → (if (zero? n) true (od? (dec n)))))) od? (λ n → (match (λ n → (if (zero? n) true (od? (dec n)))) (ev? → (if (zero? n) false (ev? (dec n))))))] (begin (print (bool2str (ev? 11))) (print (bool2str (ev? 12))) (print (bool2str (od? 11))) (print (bool2str (od? 12)))))
Sorry, something went wrong.
swr1bm86
No branches or pull requests
e.g.
(let [p1 v1 p2 v2] body)
desuger to
this is quite useful when
v1
andv2
are just called recursively inside the function itself.The text was updated successfully, but these errors were encountered: