Hacker News new | ask | show | jobs
by egamble 3368 days ago
I wrote something like that several years ago: https://github.com/egamble/let-else
2 comments

I really like `:delay`. It will allow efficiencies in my already Haskell-esque "define all possible values used in a single big let" style I program in. My code all handles nil safely and returns nil when appropriate but it would be even better to avoid evaluating things unless used in the body of the else (or a later binding).
Really cool! May have to borrow this some day.