tail-recursiontail recursion” means that the last statement in a function, is a recursive call to the same function. SO link

lazy vs short circut eval Lazy only eval when needed, vs short-circut stil lsees

Thursday quiz mats

define let map start lamda yield


In scheme, cannot use for loop, must b recurisve 2 prevent side effect. Example factorial program:

(define (fact n))
    (if(=n 0))
    	1
    	(* (fac (-n 1)) n)
    )
)

If using or, if first element is true we don’t care about the rest of the statements! This is called lazy evaluation/short circut evaluation. Basically if first case true, we drop following expr

Quiz stuff

Use example to show y side effect will make program hard to understand?