Earlier quoted context omitted.
It's a little funny comparing a language with another language+plus-its-entire-ecosystem, but k fares remarkably well I think. Counter could be #:'=: (count each group) c:#:'=: Values would just be dot. Counter[x]&Counter[y] is a bit tricky to write, because while the documentation says set intersection, what they really mean is the set intersection of the keys with the lower of the values. This is entirely clear in…
> It's a little funny comparing a language with another language+plus-its-entire-ecosystem This is pretty much my point: any ‘reimplement this weird built-in thing in $OTHER_LANG’ is going to involve overheads unless $OTHER_LANG also has that thing. I don't think keeping most types out of prelude should be a downside; you can always ‘from myprelude import * ’ if you disagree. > How would you do this in Python? I don'…
I don't understand what that means.
> I don't really know what "persists the unique index of f" means, but this seems similar to shelve. I can misuse that to give the same effect as what you showed.
I think you got it, but it seems like a lot of typing!
How many characters do you have to change if you want it purely in memory? In k I just write:
`x?`f