This website requires JavaScript.
Explore
Help
Sign In
mirror
/
RosettaCodeData
mirror of
https://github.com/acmeism/RosettaCodeData.git
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
Packages
Projects
Releases
Wiki
Activity
main
RosettaCodeData
/
Task
/
Apply-a-callback-to-an-array
/
Crystal
/
apply-a-callback-to-an-arra...
8 lines
105 B
Crystal
Raw
Permalink
Blame
History
values
=
[
1
,
2
,
3
]
new_values
=
values
.
map
do
|
number
|
number
*
2
end
puts
new_values
#=> [2, 4, 6]
Reference in New Issue
View Git Blame
Copy Permalink