On 1: Enumerable#count vs Enumerable#reduce you're correct, but I did it intentionally to set up the Monoid intro as something that is "reducible" is by its nature parallelizeable if you can express it like I did before mentioning that.
On 2: Array#slice and Range#% are a lot of fun, though I still prefer Range#step for clarity. Truthfully I wasn't sure that'd work either with slice and was pleasantly surprised.
On 3: Granted my entire "Reducing Enumerable" talk was a very thinly veiled Monoid tutorial, and that always gets some fun reactions when I tell people that's what they just learned. People like using mathematical terms to teach people who don't know math terms, and predictably it doesn't fit their internal metaphor catalogue. Conversely this would probably annoy a mathematician.
On 4: I feel like I'm right there. I could make this work with threads and TruffleRuby but I want to get it to work T_T
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
On 1:
Enumerable#count
vsEnumerable#reduce
you're correct, but I did it intentionally to set up the Monoid intro as something that is "reducible" is by its nature parallelizeable if you can express it like I did before mentioning that.On 2:
Array#slice
andRange#%
are a lot of fun, though I still preferRange#step
for clarity. Truthfully I wasn't sure that'd work either withslice
and was pleasantly surprised.On 3: Granted my entire "Reducing Enumerable" talk was a very thinly veiled Monoid tutorial, and that always gets some fun reactions when I tell people that's what they just learned. People like using mathematical terms to teach people who don't know math terms, and predictably it doesn't fit their internal metaphor catalogue. Conversely this would probably annoy a mathematician.
On 4: I feel like I'm right there. I could make this work with threads and TruffleRuby but I want to get it to work T_T