You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the tutorial exercise 1.4.3:
Consider the expression (if (fx> 3 4) (fxadd1 3) (fxlognot 5)): fx> first compares it arguments, generates 0 or 1, and then returns #t or #f depending on the result. if then evaluates the result, compares to #f, and then decides what to do.
The fix would be to have a different definition of emit-expr which would just generate 1 or 0 as the result of the boolean expression. This alternate form would be called only from the test expression of an if, so would not affect results. This would save us in the creation of the boolean.
The text was updated successfully, but these errors were encountered:
From the tutorial exercise 1.4.3:
Consider the expression
(if (fx> 3 4) (fxadd1 3) (fxlognot 5))
:fx>
first compares it arguments, generates 0 or 1, and then returns#t
or#f
depending on the result.if
then evaluates the result, compares to#f
, and then decides what to do.The fix would be to have a different definition of
emit-expr
which would just generate 1 or 0 as the result of the boolean expression. This alternate form would be called only from the test expression of anif
, so would not affect results. This would save us in the creation of the boolean.The text was updated successfully, but these errors were encountered: