Remix.run Logo
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

  either some-condition { print "was true" } { print "was false" }
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:

    print either pwd = "correct" { "Hello" } { "Locked" }
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]