Quantcast
Channel: Why is one-armed "if" missing from Racket? - Stack Overflow
Browsing index pages (2 articles)

Why is one-armed "if" missing from Racket?

In standard Scheme it is possible to write(if (> x 2) (set! x (- x 1)))but this is not possible in Racket -- Racket's if always requires two arms. Why?

View Article


Answer by soegaard for Why is one-armed "if" missing from Racket?

RationaleThe one-armed variant of if was removed from Racket to prevent bugs.In functional code one always uses the two-armed variant of if.(if test expr-on-true expr-on-false)Forgetting the second arm...

View Article

Browsing index pages (2 articles)


Latest Images