Array#unzip

M

MenTaLguY

--=-9IMhqHR9HJQZ/WlBYbpG
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Any particular reason we don't have an Array#unzip, or should I RCR
this?

class Array
def unzip( n=3D2 )
(0...n).map { |i| map { |tuple| tuple } }
end
end

-mental

--=-9IMhqHR9HJQZ/WlBYbpG
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDbs/kcUNIGiXCc4MRAlqnAKC2pshNPqVyuSab+2jSh2BjpxuItgCcDMPN
Ukr4zpWV5/mvymgoY5iRf18=
=5lfp
-----END PGP SIGNATURE-----

--=-9IMhqHR9HJQZ/WlBYbpG--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top