-
-
Save powellnathanj/152906 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> def select_big(ar) | |
>> ar.select{|n| n > 2} | |
>> end | |
>> select_big([1, 2, 3]) | |
=> [3] | |
Or you could duck punch it, and re-open Array. Not as succinct as Clojure tho, ur rite there. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment