0

I've been searching for a while for a function that does this in (Common) Lisp. Does one already exist, or do I need to code it on my own? To be more specific, I'm looking for a function that if I fed it in something like '(1 2 4 1), it would return 1?

1

1 Answer 1

2

You would need to make it yourself. You'll need to keep the count for all the elements, then do a scan through the hash to find which one has the highest frequency.

Of course it could be that more than one has the highest frequency, what then?

Not the answer you're looking for? Browse other questions tagged or ask your own question.