Skip to content

Instantly share code, notes, and snippets.

@nfedyashev
Created October 24, 2020 05:24
Show Gist options
  • Save nfedyashev/4d52739680fcd61290424800d3a07216 to your computer and use it in GitHub Desktop.
Save nfedyashev/4d52739680fcd61290424800d3a07216 to your computer and use it in GitHub Desktop.
The simplest implementation might look like this:
<!-- language: lang-ruby -->
class ArrayUtils
def self.multiplos(num, step)
step.step(num * step, step).to_a
end
end
but you may need to add some additional checks for input arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment