trampoline

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t Trampoline) interface{}

Types

type Continuation

type Continuation interface {
	Continue() Trampoline
}

type Done

type Done struct {
	Result interface{}
}

func (Done) FlatMap

func (d Done) FlatMap(f func(interface{}) Trampoline) Trampoline

func (Done) Map

func (d Done) Map(f func(interface{}) interface{}) Trampoline

func (Done) Resume

func (d Done) Resume() interface{}

func (Done) Then

func (d Done) Then(f func(interface{})) Trampoline

type FlatMap

type FlatMap struct {
	Subroutine   Trampoline
	Continuation func(interface{}) Trampoline
}

func (FlatMap) FlatMap

func (m FlatMap) FlatMap(f func(interface{}) Trampoline) Trampoline

func (FlatMap) Map

func (m FlatMap) Map(f func(interface{}) interface{}) Trampoline

func (FlatMap) Resume

func (m FlatMap) Resume() interface{}

func (FlatMap) Then

func (m FlatMap) Then(f func(interface{})) Trampoline

type More

type More func() Trampoline

func (More) Continue

func (m More) Continue() Trampoline

func (More) FlatMap

func (m More) FlatMap(f func(interface{}) Trampoline) Trampoline

func (More) Map

func (m More) Map(f func(interface{}) interface{}) Trampoline

func (More) Resume

func (m More) Resume() interface{}

func (More) Then

func (m More) Then(f func(interface{})) Trampoline

type Trampoline

type Trampoline interface {
	Resume() interface{}
	FlatMap(f func(interface{}) Trampoline) Trampoline
	Map(f func(interface{}) interface{}) Trampoline
	Then(f func(interface{})) Trampoline
}

func MapTrampoline

func MapTrampoline(t Trampoline, f func(interface{}) interface{}) Trampoline

func ThenTrampoline

func ThenTrampoline(t Trampoline, f func(interface{})) Trampoline

Jump to

Keyboard shortcuts

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