pointed

package
v2.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pointed

type Pointed[A, HKTA any] interface {
	// Of lifts a pure value into its higher-kinded type context.
	//
	// This operation wraps a value A in the minimal context required by the type HKTA,
	// creating a valid instance of the higher-kinded type.
	Of(A) HKTA
}

Pointed represents a type that can lift a pure value into a computational context.

Pointed is the minimal extension of a Functor that adds the ability to create a context-wrapped value from a bare value. It provides the canonical way to construct values of a higher-kinded type.

Type Parameters:

  • A: The value type to be lifted into the context
  • HKTA: The higher-kinded type containing A (e.g., Option[A], Either[E, A])

Example:

// Given a pointed functor for Option[int]
var p Pointed[int, Option[int]]
result := p.Of(42) // Returns Some(42)

Jump to

Keyboard shortcuts

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