|
|
|
|
|
by hibbelig
830 days ago
|
|
I think you need to go down the conditionals in order anyway, if cond* it’s like cond in that it evaluates the conditions top to bottom. So keeping track of “all the bindings so far” makes intuitive sense to me. I also see a parallel to if/else if/else cascades. You can “break” and else if leg into … else { zzz; if (…) … } and then you can declare new variables at the zzz spot that are then available for the rest of the cascade. I don’t know much about pcase and cond* so I can’t speak to the more general point. I just wanted to mention one specific aspect. I miss emacs but as a Java developer what can you do… |
|
In Scheme there is sometimes:
But even there all the embedded "define"s, by standard, need to be at the top of the body, directly at the start.