problem9

package
v0.0.0-...-cb75c49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 0 Imported by: 0

README

Problem 9

Create a function that takes an int as its parameter and returns another function. The returned function must take a as many as needed int as its parameter, and return a slice of the int multiplied by the int that was passed into the first function.

first := factory(15)
first(2, 3, 4) // [30, 45, 60]

second := factory(2)
second(1, 2, 3, 4) // [2, 4, 6, 8]

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL