Skip to content

Instantly share code, notes, and snippets.

@suryagaddipati
Created August 30, 2011 01:04
Show Gist options
  • Save suryagaddipati/1179852 to your computer and use it in GitHub Desktop.
Save suryagaddipati/1179852 to your computer and use it in GitHub Desktop.
numbers = [ 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 ]
output = _{
from x
in_ numbers
where (x == 3 || x == 5 || x == 8) && ( x % 2) == 0
select x * 3
}
output.should == [24]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment