mode (most common) of a list? is there object or external?

diablodale's icon

Is there an object, external, or abstraction that will give me the mode of a list?

The mode meaning the most common item occurring in a list.

For example, if the list is:  3 8 11 5 9 2 8 3 67 8
Then the mode is: 8

Hopefully, this code would also work on floats and symbols...on atoms.

Is there?

Rick's icon

[Lmost] part of Lobjects from Peter Elsea

metamax's icon

This seemed easy enough until I started messing with it...

And now I'm done messing with it.

I don't know if this is useful, but I bet Rick could make it useful.

Max Patch
Copy patch and select New From Clipboard in Max.