primes

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 1 Imported by: 0

README

go-primer

Prime number generator using goroutines and channels

Go Reference

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(in <-chan uint, out chan<- uint, prime uint)

Filter copies the values from channel 'in' to channel 'out', removing those divisible by 'prime'.

func Nth

func Nth(n uint) uint

Nth computes the n-th prime using a daisy-chain filter process, which filters composite numbers concurrently

func Odds

func Odds(start uint, ch chan<- uint)

Odds writes a sequence of odd numbers starting with `start` to the channel `ch`

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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