Versions in this module Expand all Collapse all v0 v0.3.0 Nov 29, 2026 Changes in this version type Option + func (me Option[V]) Map[U any](f func(V) U) (out Option[U]) v0.2.0 Nov 25, 2025 Changes in this version type Option + func (me Option[V]) Filter(f func(V) bool) Option[V] v0.1.0 Jul 8, 2025 Changes in this version type Option + func (me Option[V]) Iter() iter.Seq[V] v0.0.3 Jun 3, 2025 Changes in this version + func MakeMapIfNilWithCap[K comparable, V any, M ~map[K]V, C constraints.Integer](pm *M, cap C) + func MapMustAssignNew[K comparable, V any, M ~map[K]V](m M, k K, v V) + func MustDelete[K comparable, V any, M ~map[K]V](m M, k K) type Option + func (me Option[V]) AsTuple() (V, bool) + func (me Option[V]) Or(or Option[V]) Option[V] + func (me Option[V]) String() string + func (me Option[V]) ToPtr() *V type Result + func Err[T any](err error) Result[T] + func (r *Result[T]) IsOk() bool + func (r *Result[T]) SetErr(err error) + func (r *Result[T]) SetOk(ok T) v0.0.2 Feb 27, 2024 v0.0.1 Feb 16, 2024 Changes in this version + func ConvertToSliceOfAny[T any](ts []T) (ret []any) + func InitNew[T any](p **T) + func MakeChanWithLen[T chan U, U any, L constraints.Integer](m *T, l L) + func MakeMapIfNilAndSet[K comparable, V any](pm *map[K]V, k K, v V) (added bool) + func MakeMapIfNil[K comparable, V any, M ~map[K]V](pm *M) + func MakeMapWithCap[K comparable, V any, M ~map[K]V, C constraints.Integer](pm *M, cap C) + func MakeMap[K comparable, V any, M ~map[K]V](pm *M) + func MakeSliceWithCap[T any, L constraints.Integer](slice *[]T, cap L) + func MakeSliceWithLength[T any, L constraints.Integer](slice *[]T, length L) + func MapContains[K comparable, V any, M ~map[K]V](m M, k K) bool + func MapMustGet[K comparable, V any, M ~map[K]V](m M, k K) V + func Max[T constraints.Ordered](a, b T) T + func Min[T constraints.Ordered](a, b T) T + func PtrTo[T any](t T) *T + func Range[T constraints.Integer](n T) []struct + func ReverseSlice[T any](slice []T) + func Reversed[T any](slice []T) []T + func SetZero[T any](p *T) + func Singleton[T any](t T) []T + func SliceDrop[T any](n int, slice []T) []T + func SliceMap[From, To any](froms []From, convert func(From) To) []To + func SlicePop[T any](slice *[]T) T + func SliceTake[T any](n int, slice []T) []T + func UnwrapErrorTuple[T any](t T, err error) T + func ZeroValue[T any]() (zero T) + type Future interface + Wait func(ctx context.Context) T + type Option struct + Ok bool + Value V + func MapInsert[K comparable, V any, M ~map[K]V](m M, k K, v V) Option[V] + func None[V any]() Option[V] + func OptionFromTuple[T any](t T, ok bool) Option[T] + func SliceGet[T any, I constraints.Integer](slice []T, index I) (ret Option[T]) + func Some[V any](value V) Option[V] + func (me *Option[V]) Set(v V) + func (me *Option[V]) SetFromTuple(v V, ok bool) + func (me *Option[V]) SetNone() + func (me *Option[V]) SetSomeZeroValue() + func (me *Option[V]) UnwrapPtr() *V + func (me Option[V]) AndThen(f func(V) Option[V]) Option[V] + func (me Option[V]) Unwrap() V + func (me Option[V]) UnwrapOr(or V) V + func (me Option[V]) UnwrapOrZeroValue() (_ V) + type Result struct + Err error + Ok T + func ResultFromTuple[T any](t T, err error) Result[T] + func (r Result[T]) AsTuple() (T, error) + func (r Result[T]) ToOption() Option[T] + func (r Result[T]) Unwrap() T