Guest User

Untitled

a guest
Feb 19th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. class Proc
  2. def +(other)
  3. proc {|*args|
  4. args = [self.call(*args)]
  5. other.call(*args)
  6. }
  7. end
  8. end
  9.  
  10. [9, 19, 29].map( &:succ + &:to_s + &:reverse )
  11. #=> ["01", "02", "03"]
Add Comment
Please, Sign In to add comment