4 ms·
Actually there is a let and let* equivalent as well: (let* ((v1 e1) (v2 e2)) e3) ⟶ ((v1:=e1), (v2:=e2), e3)[-1] Dr. Racket example: > (let* ((x (+ 3 4
by raymondh 6y ago
Actually there is a let and let* equivalent as well:
(let* ((v1 e1) (v2 e2)) e3) ⟶ ((v1:=e1), (v2:=e2), e3)[-1]
Dr. Racket example:
> (let* ((x (+ 3 4)) (y (* x x))) (+ y (- x) 8))
50
Python equivalent:
>>> ((x:=3+4), (y:=x**2), y-x+8)[-1]
50
- Iwan-Zotow 6y agoYes, with walrus expression, lambda gains a lot of flexibility