Documentation ¶
Overview ¶
Package builtin provides the Hermes builtin functions.
Index ¶
- func Errorf(where any, msg string, args ...any) any
- func FoldLeft[In, Out any](s []In, init Out, fn func(In, Out) Out) Out
- func FoldRight[In, Out any](s []In, init Out, fn func(In, Out) Out) Out
- func Fresh[ID any]() ID
- func Map[In, Out any]([]In, func(In) Out) []Out
- func MapIndex[In, Out any]([]In, func(int, In) Out) []Out
- func Sorted[Elem cmp.Ordered](Set[Elem]) []Elem
- func Sum[In, Out any]([]In, func(In) Out) Out
- func Zip[In1, In2, Out any](s1 []In1, s2 []In2, fn func(In1, In2) Out) ([]Out, bool)
- type List
- type Maybe
- type Set
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FoldLeft ¶
func FoldLeft[In, Out any](s []In, init Out, fn func(In, Out) Out) Out
FoldRight returns fn(s[len-1], fn(s[len-2], ... fn(s[0], init))).
func FoldRight ¶
func FoldRight[In, Out any](s []In, init Out, fn func(In, Out) Out) Out
FoldRight returns fn(s[0], fn(s[1], ... fn(s[len-1], init))).
func Map ¶
func Map[In, Out any]([]In, func(In) Out) []Out
Map returns []Out{fn(s[0]), fn(s[1]), ..., fn(s[len-1])}.
Types ¶
type Set ¶
type Set[Elem comparable] opaque
func NewSet ¶
func NewSet[Elem comparable](...Elem) Set[Elem]
func (Set[Elem]) Difference ¶
Click to show internal directories.
Click to hide internal directories.