immutable

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FastForward

func FastForward(curr Immutable) (interface{}, error)

FastForward applies all Fn methods to the given chain.

Types

type Immutable

type Immutable interface {
	// Prev returns the previous element in the chain.
	Prev() Immutable
	// Fn is a function that is able to modify the passed element.
	Fn(interface{}) error
	// Base returns the first element in the chain.
	Base() interface{}
}

Immutable represents an immutable chain that, if passed to FastForward, Fn() is applied to every element in the chain. The first element of this chain is represented by Base().

Jump to

Keyboard shortcuts

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