Lists operations from right to left. Was this really needed?

bigspaces

BigSpaces

Posted on September 25, 2022

Lists operations from right to left. Was this really needed?

Today my little brain got one of the concepts that I wasn't quite getting.

What is this thing about Elixir evaluating operations from right to left when it comes to lists? I can hear José Valim giggle: "this is going to break a few brains, mwahahahahaha".

Ok, José, close call, but I got this one. Gimme something trickier.

I was initially confused by this:

Image description

WHAAAAAAAAAAAT thaaa

2?

But, but, one minus one is zero and two minus two is zero, so one and two minus one and minus two...

Image description

So I went back to Apples And Oranges. Sesame-Street my life.

Here is my genius achievement of the day. One more step to Elixir Everest.

Image description

Here is looking at you, José

Image description

git add .
git commit -m "I am sure there is a reason for this madness"

BigSpaces

💖 💪 🙅 🚩
bigspaces
BigSpaces

Posted on September 25, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related