racket - Scheme maxing a quoted list -
Then I wrote this function that lists the numbers in this format:
'(1 2 5 6 7 2) Now I need to get the maximum value of this list, but the maximum function does not work with this type of list.
what do you want
& gt; (Maximum 1 2 5 6 7 2) 7 Since your argument is in a list, use Apply : & gt; ; (Apply maximum '(1 2 5 6 7 2)) 7 See also
Comments
Post a Comment