Update: Thanks to some feedback I rewrote Enumberable#filter so it doesn’t use ‘eval’. It’s a bit less flexible now and I also like the syntax less, but at least it doesn’t eat puppies for breakfast. As the disclaimer said, maybe it was a bad idea to begin with.
As much as I like Ruby, some constructs I just don’t find too sexy, e.g.:
[1,2,5,8,7,3,1,9,5].select { |x| x < 5 }
That’s why I came up with an alternative solution which I find reads nicer than the above code:
Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago