Skip to content

Instantly share code, notes, and snippets.

@mabako
Created October 11, 2013 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mabako/6940580 to your computer and use it in GitHub Desktop.
Save mabako/6940580 to your computer and use it in GitHub Desktop.
(define (a8 a . r)
(let
(
(m (apply max r))
)
(if (>= a m)
(+ (quadrat a) (quadrat m))
(apply a8 (append r (list a)))
)
)
)
(print (a8 1 2 3 4 5 4 3 -3 9 2 9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment