-
-
Save anonymous/165490d915772b902f64 to your computer and use it in GitHub Desktop.
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
module MathTalk | |
def array_add(arr) | |
result = 0 | |
arr.each { |x| result += x } | |
rescue | |
unless arr.is_a? | |
result = "Enter an array stupid!" | |
end | |
return result | |
end | |
# def array_op_cycler(arr, cycle_in = 1) | |
# end | |
end | |
MathTalk.array_add("bla") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment