Trying to emulate list comprehensions syntax I came with this syntax that resembles haskell list comprehensions (by having several guards separated by ,
and allowing zero guards):
> (1..24).comp { |x| [x, x.even?, x > 6] }
=> [8, 10, 12, 14, 16, 18, 20, 22, 24]
> [nil, nil, 1, 2, 3, 4, 5].comp { |x| [x, x != 4] }
=> [nil, nil, 1, 2, 3, 5]
> [nil, nil, 1, 2, 3, 4, 5].comp { |x| [x] }
=> [nil, nil, 1, 2, 3, 4, 5]