Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
[Perl 6] Flattening an array.
cwchen
Nov 15th, 2017
10,512
0
Never
2
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
Perl 6
0.11 KB
| None
|
0
0
raw
download
clone
embed
print
report
sub
add
(
$x
,
$y
)
{
$x
+
$y
;
}
my
@arr
=
(
3
,
4
)
;
my
$sum
=
add
(
|
@arr
)
;
$sum
==
7
or
die
"Wrong value"
;
Advertisement
Comments
User was banned
User was banned
Add Comment
Please,
Sign In
to add comment
Public Pastes
Untitled
Python | 6 hours ago | 8.34 KB
2026_09_updated_sep__TEMP
10 hours ago | 1.50 KB
Asking IM About Client's PR Team
14 hours ago | 0.85 KB
CCA
14 hours ago | 0.01 KB
Explaining Why We Don't Use Client Email...
14 hours ago | 0.62 KB
Untitled
19 hours ago | 2.53 KB
[TLF - A KING'S MEMORY]
1 day ago | 1.62 KB
ccounter.cpp
C++ | 1 day ago | 3.61 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!