4 ms·
I think Ruby might be your next language :) But I do do the following sort of thing in Python: ``` from chainzzz import C C(some_list).group_by(lambda x: x +
by meisel 3y ago
I think Ruby might be your next language :)
But I do do the following sort of thing in Python:
```
from chainzzz import C
C(some_list).group_by(lambda x: x + 1).map(lambda key: key % 2).size()
```
Where C(...) gives us the same object but with some methods added to it as you can see
- saagarjha 3y agoHmm, that's an interesting way of doing it. I'll keep it in my back pocket if they ever break this :)