Documentation ¶
Index ¶
- func HashMapFoldLeft[K comparable, V any, T any](src HashMap[K, V], dst T, p func(T, K, V) T) T
- func SeqFoldLeft[T1 any, T2 any](src Sequence[T1], dst T2, p func(T2, int, T1) T2) T2
- type HashMap
- func (o HashMap[K, V]) Contains(s V) bool
- func (o HashMap[K, V]) Filter(f func(K, V) bool) HashMap[K, V]
- func (o HashMap[K, V]) Find(f func(K, V) bool) mo.Option[tuple.T2[K, V]]
- func (o HashMap[K, V]) FoldLeft(z HashMap[K, V], f func(HashMap[K, V], K, V) HashMap[K, V]) HashMap[K, V]
- func (o HashMap[K, V]) Get(k K) mo.Option[tuple.T2[K, V]]
- func (o HashMap[K, V]) GetOrElse(k K, def V) V
- func (o *HashMap[K, V]) GobDecode(data []byte) error
- func (o HashMap[K, V]) GobEncode() ([]byte, error)
- func (o HashMap[K, V]) HasKey(k K) bool
- func (o HashMap[K, V]) IsEmpty() bool
- func (o HashMap[K, V]) Join(m HashMap[K, V]) HashMap[K, V]
- func (o HashMap[K, V]) Keys() Sequence[K]
- func (o HashMap[K, V]) Map(f func(K, V) V) HashMap[K, V]
- func (o HashMap[K, V]) Remove(key K) HashMap[K, V]
- func (o HashMap[K, V]) Size() int
- func (o HashMap[K, V]) ToMap() map[K]V
- func (o HashMap[K, V]) ToSequence() Sequence[tuple.T2[K, V]]
- func (o HashMap[K, V]) ToSlice() []tuple.T2[K, V]
- func (o HashMap[K, V]) Update(key K, value V) HashMap[K, V]
- func (o HashMap[K, V]) Values() Sequence[V]
- type Sequence
- func (o Sequence[V]) Append(values ...V) Sequence[V]
- func (o Sequence[V]) Contains(e V) bool
- func (o Sequence[V]) Filter(p func(V) bool) Sequence[V]
- func (o Sequence[V]) FilterWithIndex(p func(int, V) bool) Sequence[V]
- func (o Sequence[V]) Find(f func(V) bool) mo.Option[V]
- func (o Sequence[V]) FindWithIndex(f func(int, V) bool) mo.Option[tuple.T2[int, V]]
- func (o Sequence[V]) FoldLeft(z Sequence[V], p func(Sequence[V], int, V) Sequence[V]) Sequence[V]
- func (o Sequence[V]) FoldRight(z Sequence[V], p func(Sequence[V], int, V) Sequence[V]) Sequence[V]
- func (o Sequence[V]) Head() mo.Option[V]
- func (o Sequence[V]) Index(i int) mo.Option[V]
- func (o Sequence[V]) IndexOf(e V) (int, bool)
- func (o Sequence[V]) IsEmpty() bool
- func (o Sequence[V]) Join(seq Sequence[V]) Sequence[V]
- func (o Sequence[V]) Map(f func(V) V) Sequence[V]
- func (o Sequence[V]) MapWithIndex(f func(int, V) V) Sequence[V]
- func (o Sequence[V]) Reversed() Sequence[V]
- func (o Sequence[V]) Size() int
- func (o Sequence[V]) Sort(f func(v1, v2 V) bool) Sequence[V]
- func (o Sequence[V]) Tail() Sequence[V]
- func (o Sequence[V]) ToSlice() []V
- func (o Sequence[V]) Unique() Sequence[V]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashMapFoldLeft ¶
func HashMapFoldLeft[K comparable, V any, T any]( src HashMap[K, V], dst T, p func(T, K, V) T, ) T
Types ¶
type HashMap ¶
type HashMap[K comparable, V any] struct { // contains filtered or unexported fields }
HashMap is a container for an optional Values of type V. If Values exists, HashMap is of type Some. If the Values is absent, HashMap is of type None.
func ToMap ¶
func ToMap[K comparable, V any](data map[K]V) HashMap[K, V]
func (HashMap[K, V]) Map ¶
HashMap executes the mapper function if Values is present or returns None if absent.
func (HashMap[K, V]) ToSequence ¶
type Sequence ¶
type Sequence[V any] struct { // contains filtered or unexported fields }
Sequence is a container for an optional items of type V. If items exists, Sequence is of type V. If the items is absent, Sequence is of type None.
func NewSequence ¶
func (Sequence[V]) FilterWithIndex ¶
func (Sequence[V]) FindWithIndex ¶
func (Sequence[V]) IndexOf ¶
IndexOf Search the pairs for a given value and return position, if not found returns -1
func (Sequence[V]) MapWithIndex ¶
Click to show internal directories.
Click to hide internal directories.