You're welcome! Just to be clear, I am not the original author. I was impressed with it myself. :)
That can't, but with https://gist.github.com/605891 you can, using syntax like: [(1..6),(4..6),(7..9)].comprehension { |a, b, c| a + b + c if a % 2 == 0 } And if you go to extremes like https://gist.github.com/3356675…
You're welcome! Just to be clear, I am not the original author. I was impressed with it myself. :)
That can't, but with https://gist.github.com/605891 you can, using syntax like: [(1..6),(4..6),(7..9)].comprehension { |a, b, c| a + b + c if a % 2 == 0 } And if you go to extremes like https://gist.github.com/3356675…