Created
November 11, 2014 14:05
-
-
Save Code-Hex/8aa231f5985617b921f2 to your computer and use it in GitHub Desktop.
二重mapの動きを知るためのコード
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $num = 0; | |
map{$num += $_} map{$num += $_} 1..2; | |
print $num; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
簡単に、1~2までを扱うことにしました。
それぞれ二つのmapを左map、右mapとします。