crafting (and) JavaScript

Tagged with #ruby

In Ruby "and and or are control flow operators, not boolean operators".

In the ruby koans I now came across array functions. One is collect and I thought, this is map, and the comment below said

This article about closures in ruby started somewhere by saying "Ruby has four different ways of using closures, each of which is a tad bit different, and sometimes nonsensical".

I was fighting a little bit with getting Michael Feather's delta-flora to run, but made it finally. My starter level of ruby knowledge made it not much simpler to get it to run :). But in the end I succeeded doing the following steps.

I found this repo, which seems not to be the newest, but one (if not the only one) which provides some ways of refactoring for ruby.

I know that the calling of functions can be quite noise-less, no parantheses and commas. But it also leaves me baffled at times. I can't get my head around this one either.

One method three different return types