▲ | spankalee a day ago | |
I wish they showed the `else` syntax, because the traditional ALGOL-style if-then-else statement doesn't look native when shoved into most function call notations, unless you have something pretty interesting around named parameters and expressions delimiters. | ||
▲ | iamevn a day ago | parent | next [-] | |
See the `either` function further down
| ||
▲ | middayc a day ago | parent | prev | next [-] | |
there is no if { } else { } in REBOL or Rye and it wouldn't really fit. There is either function that accepts two code blocks. It can act as a typical if / else or as a ternary expression as it also returns the result of a block:
This is Rebol's doc on either, Rye's works exactly the same:
https://www.rebol.com/docs/words/weither.html | ||
▲ | a day ago | parent | prev [-] | |
[deleted] |