
Before I spend energy on completing my implementation - is there an implementation of “Python counters” anywhere?
https://docs.python.org/3/library/collections.html#collections.Counter

If you search for freq
or frequenc
on the online docs you may get a number of related results. Usually simpler implementations than python’s Counter though

There’s also one in the main distr somewhere but I can never remember where (math/distributions ? plot ? )

There’s also occurrences
in bazaar/dict


I can’t find bazaar in the online docs?

It’s because it’s not documented (on purpose). Feel free to steal the code anyway: https://github.com/Metaxal/bazaar/blob/master/dict.rkt#L91

Ah!

In some ways it sounds like a multiset or a bag.

There is a multiset in Rebellion

The result is certainly a multiset. I guess @soegaard2’s question is about how to collect rather than represent

Exactly.

I’ll check multiset.

In my opinion something that’s not documented may as well not exist; at least non-discoverability is a big problem.

I think Laurent is using bazaar
the same way I am using this-and-that
.

Documentation might imply support.

@samdphillips Did you catch my answer on a “repl for sketching” - or did get lost in the noise?

I saw. I’ll paste my thoughts over in the thread.

Yes, bazaar is undocumented because it’s not meant for being used as a library. It’s a collection of half-baked utilities, and sometimes some of them make it out to their own library. Surprisingly, it’s been quite stable anyway, but backward compatibility is at my discretion.