Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Jan 23rd, 2018
93
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.22 KB
| None
|
0
0
raw
download
clone
embed
print
report
class Array
def zip(a, &b)
if b
r = []
bs = lambda{ |x| r << b.call(*x) }
super(a, &bs)
return r
else
super(a)
end
end
end
# example
[1,2,3].zip([5,6,7], &:+) #=> [6,8,10]
Add Comment
Please,
Sign In
to add comment
Public Pastes
source
JavaScript | 21 min ago | 103.32 KB
vendor-birthday
PHP | 29 min ago | 4.30 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 🤑
GetText | 45 min ago | 0.39 KB
Dragon style
LScript | 46 min ago | 16.48 KB
🤑 G2A.com Free Gift Card Guide Apr 2024 FIX 💰
GetText | 47 min ago | 0.38 KB
data907
JSON | 51 min ago | 0.64 KB
archive-product.php
PHP | 58 min ago | 4.26 KB
Untitled
C++ | 59 min ago | 2.65 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!