Help us shape the future of Go! Take the 2026 Go Developer Survey

fromio

package
v2.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainFirstIOK

func ChainFirstIOK[A, B, HKTA, HKTB any, GIOB ~func() B](
	mchain func(func(A) HKTA) func(HKTA) HKTA,
	mmap func(func(B) A) func(HKTB) HKTA,
	fromio func(GIOB) HKTB,
	f func(A) GIOB) func(HKTA) HKTA

func ChainIOK

func ChainIOK[GR ~func() B, A, B, HKTA, HKTB any](
	mchain func(func(A) HKTB) func(HKTA) HKTB,
	fromio func(GR) HKTB,
	f func(A) GR) func(HKTA) HKTB

func MonadChainFirstIOK

func MonadChainFirstIOK[A, B, HKTA, HKTB any, GIOB ~func() B](
	mchain func(HKTA, func(A) HKTA) HKTA,
	mmap func(HKTB, func(B) A) HKTA,
	fromio func(GIOB) HKTB,
	first HKTA, f func(A) GIOB) HKTA

func MonadChainIOK

func MonadChainIOK[GR ~func() B, A, B, HKTA, HKTB any](
	mchain func(HKTA, func(A) HKTB) HKTB,
	fromio func(GR) HKTB,
	first HKTA, f func(A) GR) HKTB

Types

type FromIO

type FromIO[A, GA ~func() A, HKTA any] interface {
	// FromIO converts an IO computation into the target monadic type.
	FromIO(GA) HKTA
}

FromIO represents a type that can be constructed from an IO computation.

This interface provides a way to lift IO computations into other monadic contexts, enabling interoperability between IO and other effect types.

Type Parameters:

  • A: The value type produced by the IO computation
  • GA: The IO type (constrained to func() A)
  • HKTA: The target higher-kinded type

Jump to

Keyboard shortcuts

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