Code: Select all

```
;; This function takes one or more numbers as arguments. If there is a single
;; number the number is squared. If there is more than one number then the square
;; root of the sum of the squares (a^2 + b^2 + c^2 + ...)^1/2 is returned.
;; Example: (sq 3) -> 9
;; (sq 2 3) -> 3.605551275
(define-macro (sq)
(if (= (length (args)) 1)
(mul (args 0)(args 0))
(sqrt (apply add (map mul (args)(args))))))
```