Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoValue = errors.New("data: no value")
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data[A any] interface { // DValue returns the "first" value v from the sum type. If no value is // present it should panic with ErrNoValue. DValue() (v A) // DRest returns a Data interface that is scoped to the remaining // values. If no more values remain, then it should return nil. DRest() Data[A] }
Data provides a general way to get values from a sum type.
Click to show internal directories.
Click to hide internal directories.