I was very impressed with the Haskell solution to FizzBuzz. The blog is now down, but here’s the Internet Archive of the page:
I asked /r/rust about implementing monoids in the Rust programming language and got help with porting the Haskell version.
Here’s the repository:
It’s mostly written by Reddit and IRC with me piecing it together until it type checked and did the same thing the Haskell program did.
Brag: it’s actually possible to write this in Rust because Monoids don’t require higher kinds.
Beat: I have to nest .op(.op()) to do several ops because of C-style syntax
Variance: I spent lots of time trying to figure out why [_, n, ..rest] didn’t type check, until [_, n, ..] just worked