Compute Even Digits — Fun with Ramda pt.1

Tomáš Konrády
Jul 22, 2017 · 1 min read

I had a free evening. So I gave myself a “challenge”. I wanted to program pretty difficult function that computes a number of even digits in the number.

So how did I end up to solve that quest?

Seriously though.

I just like how Ramda/functional style makes you create small reusable functions as you can see in the example above. For the pretty straightforward task, I’ve created 5 reusable functions excluding countEvenDigit itself.

Do you have similar examples? Or do you love Ramda as well? Please share in the comments :)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade