vft

package
v0.0.0-...-252af9d Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NaN = math.NaN()

Functions

func Range

func Range(max float64) func() (next float64, done bool)

Types

type GenFunc

type GenFunc func() (state *Seq, next NextFunc)

func SeqFromNext

func SeqFromNext(seq *Seq, next NextFunc) GenFunc

func TryRead

func TryRead(xs *Seq) (v float64, f GenFunc)

type NextFunc

type NextFunc func(s *Seq) (float64, *Seq)

type Seq

type Seq struct {
	// contains filtered or unexported fields
}

func NewSeq

func NewSeq(f GenFunc) *Seq

func SeqFromGen

func SeqFromGen(gen GenFunc) *Seq

func (*Seq) Map

func (s *Seq) Map(f func(v float64) float64) (r *Seq)

func (*Seq) Reduce

func (s *Seq) Reduce(f func(acc, x float64) float64, acc float64) float64

func (*Seq) TryRead

func (s *Seq) TryRead() (v float64, done bool)

Jump to

Keyboard shortcuts

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