(define (foo <function>)
(method ((x <number>) (y <number>))
(bind (((z <number>) (+ x y 10)))
(* z z))))
BAD:
(define (foo <function>)(method ((x <number>)(y <number>))
(bind(((z <number>)(+ x y 10)))(* z z))))
(define ( foo <function> )
(method ( ( x <number> ) ( y <number> ) )
(bind ( ( ( z <number> ) ( + x y 10 ) ) )
( * z z )
)
)
)
Although the Dylan reader don't care which you use, most experienced Dylan programmers find the first example much easier to read than the last two.
;;; This method implements the square search loop. It keeps improving an
;;; initial guess until the value is good enough.
(define (try <function>)
(method ((guess <number>) (x <number>))
;; If it's good enough guess - return it, otw, try improving.
(if (good-enough? guess x)
guess
(try (improve guess x) x) ; loop back
)))