Side Effects

A side effect is an action of a program other than returning a value:

An otherwise correct transformation may not be correct if the code to be transformed has side-effects.

( (- (+ ?x ?y) (+ ?x ?z))    (- ?y ?z) )
does not produce the same result if applied to the code:

(- (+ (progn (print 'foo) 3) y)
   (+ (progn (print 'foo) 3) z))

Contents    Page-10    Prev    Next    Page+10    Index