Advertisement
Guest User

Untitled

a guest
Dec 24th, 2013
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.13 KB | None | 0 0
  1. Filter = lambda do |array, &block|
  2.  array.select(&block)
  3. end
  4.  
  5. a = [1,2,3,4]
  6. n = Proc.new do |b|
  7.   b.even?
  8. end
  9.  
  10. Filter.call(a,n)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement