Skip to content

Instantly share code, notes, and snippets.

@qbg
qbg / gist:817563
Created February 8, 2011 23:54 — forked from lfborjas/gist:817504
#ruby
[1,2,3,4].select{ |x| x.even? }
#python
[x for x in [1,2,3,4] if not x%2]
#or, more norvingly
filter(lambda x: not x%2, [1,2,3,4])
#clojure
(filter even? [1 2 3 4])