So far I found this page:
http://community.schemewiki.org/?sicp-ex-1.6

"The act of re-defining a special form using generic arguments effectively
"De-Special Forms" it. It then becomes subject to applicative-order
evaluation, such that any expressions within the consequent or alternate
portions are evaluated regardless of the predicate."

Therefore it appears Scheme is applicative order except for special forms
like "if"?

Thanks

On Wed, Mar 18, 2020 at 4:23 PM Nicholas Papadonis <
nick.papadonis...@gmail.com> wrote:

> It seems that if the second argument to if is not evaluated.  Thanks!
>
> (define (try a b)
>   (if (= a 0) 1 b))
> ;Value: try
>
> ; Looks like applicative order evaluation:
> (try 0 (/ 1 0))
> ;Division by zero signalled by /.
>
> ; Looks like normal order evaluation from the left
> (if (= 1 1) 1 (/ 1 0))
> ;Value: 1
>
> ; How is it implemented?
> (pp if)
> ;Syntactic keyword may not be used as an expression: #[keyword-value-item
> 16]
>

Reply via email to