PPT Slide
Using LET in Functions
( defun function_with_let ( L )
( let ( ( begin ( first L ) )
( end ( car ( last L ) ) ) )
( list begin end ) ) )
( defun roots ( a b c )
( let ( (disc (sqrt (- (* b b ) (* 4 a c ) ) ) )
( denom ( * 2 a ) )
( minusb ( - b ) ) )
( list ( / ( + minusb disc ) denom )
( / ( - minusb disc ) denom ) ) ) )
1.52
Previous slide
Next slide
Back to first slide
View graphic version