db.v3: upper.io/db.v3/internal/immutable Index | Files

package immutable

import "upper.io/db.v3/internal/immutable"

Index

Package Files

immutable.go

func FastForward Uses

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

FastForward applies all Fn methods in order on the given new Base.

type Immutable Uses

type Immutable interface {
    // Prev is the previous element on a chain.
    Prev() Immutable
    // Fn a function that is able to modify the passed element.
    Fn(interface{}) error
    // Base is the first element on a chain, there's no previous element before
    // the Base element.
    Base() interface{}
}

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

Package immutable is imported by 4 packages. Updated 2018-10-27. Refresh now. Tools for package owners.