Skip to content

Instantly share code, notes, and snippets.

@lexisother
Created January 12, 2023 20:23
Show Gist options
  • Save lexisother/85a527138f1ab719b93930602f3f7c7e to your computer and use it in GitHub Desktop.
Save lexisother/85a527138f1ab719b93930602f3f7c7e to your computer and use it in GitHub Desktop.
(defun maxcount (nums)
(max (count-if (lambda (a) (< a 0)) nums)
(count-if (lambda (a) (> a 0)) nums)))
(print (maxcount '(1 2 3 4 5 6 -3 -5 7 -7)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment