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

Popular posts from this blog

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -

jasper reports - How to center align barcode using jasperreports and barcode4j -

django - CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False -