fizzbuzz

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FizzBuzz

func FizzBuzz(ctx context.Context, multipleReplacements map[int]string) (<-chan string, error)

FizzBuzz returns a channel that emits numbers starting from 1 until the context is cancelled with multipleReplacements done multipleReplacements should be a map, where each multiple to be replaced is the key and its replacement is the corresponding value, e.g. map[int]string{3: "Fizz", 5: "Buzz"} for the classic example of this problem.

Types

This section is empty.

Jump to

Keyboard shortcuts

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