racket - scheme' conditional expression and evaluation order -


thinking following expression:

(cond (p1 (some_complex_expression1))       (p2 (some_complex_expression2))       (p3 (some_complex_expression3))       ...       (else (some_complex_expressionn))) 

are (some_complex_expressionx)s evaluated on demand? (i.e. '(some_complex_expressionx)' evaluated when predicate before itself, px true) or, follow applicative order(they somehow evaluated as possible before trying predicates)

if implementation-dependent, how following implementations?

mit-scheme guile racket scheme sicp r5rs 

the test must return true value before associated expressions evaluated. guaranteed scheme standards; see section 4.2.1 of r5rs, example.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -