Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Ruby custom inject
# Put your solution there puts ([1, 2, 3].custom_inject([4]) { |a, e| a << e * 2 }).to_s # => [4, 2, 4, 6] puts ([2, 3, 4].custom_inject([]) { |a, e| a << e + 1 }).to_s # => [3, 4, 5]
run
|
edit
|
history
|
help
0
Adiel Vasquez
simple cache
Arithmetic Operations, Function Calls, Recursion and more in Ruby
Hash and Symbols
variables output
Ruby Inheritence
piramid
regex.rb
string orperations lecture and print
piramid2