Wha-wha-what?! You can make your own control structures?

programaticprogammer-programmingerlang.jpg
I’m working through the Programming Erlang book that my friend zuzu recommended to me. Forty-six pages in, and so far, so good.

I did, however, just have my mind blown. I was going through an example for creating a for-loop-like function, because erlang doesn’t have a for-loop. “Well,” I thought, “that’s interesting that you have to create your own control structures.” But then the book spelled it out straightly: you can create any control structure you want — you are not limited by the control structures that the language offers.

Result? Mind is blown.

Leave a Reply

notes about computers and lifestyle