↧
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 ArticleWhy 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