The musings of a nerd

Folding Elixir

In functional programming, “folding” is something of a building block of other operations you may be familiar with, such as map and filter. Folding can be done from the left and from the right. Choosing the best direction depends on the problem you’re solving.

Assignment vs. Matching

A brief explanation of assignment and (pattern) matching.

Ruby Argument Destructuring

TL;DR You can use Ruby destructuring and the splat operator (*) to simulate basic pattern matching.

More posts…