Documentation ¶
Index ¶
- Variables
- func Compose(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
- func Concat(mine []interface{}, slices ...[]interface{}) []interface{}
- func CurryParam1(fn func(interface{}, ...interface{}) interface{}, a interface{}) func(...interface{}) interface{}
- func CurryParam1ForSlice1(fn func(interface{}, []interface{}) interface{}, a interface{}) func(...interface{}) interface{}
- func CurryParam2(fn func(interface{}, interface{}, ...interface{}) interface{}, a interface{}, ...) func(...interface{}) interface{}
- func CurryParam3(fn func(interface{}, interface{}, interface{}, ...interface{}) interface{}, ...) func(...interface{}) interface{}
- func CurryParam4(...) func(...interface{}) interface{}
- func CurryParam5(...) func(...interface{}) interface{}
- func CurryParam6(...) func(...interface{}) interface{}
- func Dedupe(list ...interface{}) []interface{}
- func Difference(arrList ...[]interface{}) []interface{}
- func Distinct(list ...interface{}) []interface{}
- func DistinctRandom(list ...interface{}) []interface{}
- func Drop(count int, list ...interface{}) []interface{}
- func DropEq(num interface{}, list ...interface{}) []interface{}
- func DropLast(count int, list ...interface{}) []interface{}
- func DropWhile(f Predicate, list ...interface{}) []interface{}
- func DuplicateMap(input map[interface{}]interface{}) map[interface{}]interface{}
- func DuplicateSlice(list []interface{}) []interface{}
- func Either(value interface{}, patterns ...Pattern) interface{}
- func Every(f Predicate, list ...interface{}) bool
- func Exists(input interface{}, list ...interface{}) bool
- func Filter(fn func(interface{}, int) bool, input ...interface{}) []interface{}
- func Flatten(list ...[]interface{}) []interface{}
- func GroupBy(grouper TransformerFunctor, list ...interface{}) map[interface{}][]interface{}
- func Head(list ...interface{}) interface{}
- func Intersection(inputList ...[]interface{}) []interface{}
- func IntersectionMapByKey(inputList ...map[interface{}]interface{}) map[interface{}]interface{}
- func IsDistinct(list ...interface{}) bool
- func IsEqual(list1, list2 []interface{}) bool
- func IsEqualMap(map1, map2 map[interface{}]interface{}) bool
- func IsNil(obj interface{}) bool
- func IsPtr(obj interface{}) bool
- func IsSubset(list1, list2 []interface{}) bool
- func IsSubsetMapByKey(item1, item2 map[interface{}]interface{}) bool
- func IsSuperset(list1, list2 []interface{}) bool
- func IsSupersetMapByKey(item1, item2 map[interface{}]interface{}) bool
- func IsZero(v interface{}) bool
- func Keys(m map[interface{}]interface{}) []interface{}
- func Kind(obj interface{}) reflect.Kind
- func MakeNumericReturnForParam1ReturnBool1(fn func(interface{}) bool) func(...interface{}) []interface{}
- func MakeNumericReturnForSliceParamReturnBool1(fn func([]interface{}) bool) func(...interface{}) []interface{}
- func MakeNumericReturnForVariadicParamReturnBool1(fn func(...interface{}) bool) func(...interface{}) []interface{}
- func MakeVariadicParam1(fn func(interface{}) []interface{}) func(...interface{}) []interface{}
- func MakeVariadicParam2(fn func(interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
- func MakeVariadicParam3(fn func(interface{}, interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
- func MakeVariadicParam4(fn func(interface{}, interface{}, interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
- func MakeVariadicParam5(...) func(...interface{}) []interface{}
- func MakeVariadicParam6(...) func(...interface{}) []interface{}
- func MakeVariadicReturn1(fn func(...interface{}) interface{}) func(...interface{}) []interface{}
- func MakeVariadicReturn2(fn func(...interface{}) (interface{}, interface{})) func(...interface{}) []interface{}
- func MakeVariadicReturn3(fn func(...interface{}) (interface{}, interface{}, interface{})) func(...interface{}) []interface{}
- func MakeVariadicReturn4(fn func(...interface{}) (interface{}, interface{}, interface{}, interface{})) func(...interface{}) []interface{}
- func MakeVariadicReturn5(...) func(...interface{}) []interface{}
- func MakeVariadicReturn6(...) func(...interface{}) []interface{}
- func Map(fn TransformerFunctor, values ...interface{}) []interface{}
- func MapIndexed(fn func(interface{}, int) interface{}, values ...interface{}) []interface{}
- func MatchCompType(compType CompType, value CompData) bool
- func MatchCompTypeRef(compType CompType, value *CompData) bool
- func Merge(map1, map2 map[interface{}]interface{}) map[interface{}]interface{}
- func Minus(set1, set2 []interface{}) []interface{}
- func MinusMapByKey(set1, set2 map[interface{}]interface{}) map[interface{}]interface{}
- func PMap(f TransformerFunctor, option *PMapOption, list ...interface{}) []interface{}
- func Partition(predicate Predicate, list ...interface{}) [][]interface{}
- func Pipe(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
- func Prepend(element interface{}, list []interface{}) []interface{}
- func PtrOf(v interface{}) *interface{}
- func Reduce(fn ReducerFunctor, memo interface{}, input ...interface{}) interface{}
- func ReduceIndexed(fn func(interface{}, interface{}, int) interface{}, memo interface{}, ...) interface{}
- func Reject(fn func(interface{}, int) bool, input ...interface{}) []interface{}
- func Reverse(list ...interface{}) []interface{}
- func SliceOf(args ...interface{}) []interface{}
- func SliceToMap(defaultValue interface{}, input ...interface{}) map[interface{}]interface{}
- func Some(f Predicate, list ...interface{}) bool
- func Sort(fn Comparator, input []interface{})
- func SortBySortDescriptors(sortDescriptors []SortDescriptor, input []interface{})
- func SortSlice(fn Comparator, input ...interface{}) []interface{}
- func SortedListBySortDescriptors(sortDescriptors []SortDescriptor, input ...interface{}) []interface{}
- func SplitEvery(size int, list ...interface{}) [][]interface{}
- func Tail(list ...interface{}) []interface{}
- func Take(count int, list ...interface{}) []interface{}
- func TakeLast(count int, list ...interface{}) []interface{}
- func Trampoline(fn func(...interface{}) ([]interface{}, bool, error), input ...interface{}) ([]interface{}, error)
- func Union(arrList ...[]interface{}) []interface{}
- func UniqBy(identify TransformerFunctor, list ...interface{}) []interface{}
- func Values(m map[interface{}]interface{}) []interface{}
- func Zip(list1 []interface{}, list2 []interface{}) map[interface{}]interface{}
- type ActorDef
- func (actorSelf *ActorDef) Close()
- func (actorSelf *ActorDef) GetChild(id time.Time) *ActorDef
- func (actorSelf *ActorDef) GetDefault() *ActorDef
- func (actorSelf *ActorDef) GetID() time.Time
- func (actorSelf *ActorDef) GetParent() *ActorDef
- func (actorSelf *ActorDef) IsClosed() bool
- func (actorSelf *ActorDef) New(effect func(*ActorDef, interface{})) *ActorDef
- func (actorSelf *ActorDef) NewByOptions(effect func(*ActorDef, interface{}), ioCh chan interface{}, ...) *ActorDef
- func (actorSelf *ActorDef) Send(message interface{})
- func (actorSelf *ActorDef) Spawn(effect func(*ActorDef, interface{})) *ActorDef
- type ActorHandle
- type AskDef
- func (askSelf *AskDef) AskChannel(target ActorHandle) chan interface{}
- func (askSelf *AskDef) AskOnce(target ActorHandle) interface{}
- func (askSelf *AskDef) AskOnceWithTimeout(target ActorHandle, timeout time.Duration) (interface{}, error)
- func (askSelf *AskDef) New(message interface{}) *AskDef
- func (askSelf *AskDef) NewByOptions(message interface{}, ioCh chan interface{}) *AskDef
- func (askSelf *AskDef) Reply(response interface{})
- type AtomBool
- type BufferedChannelQueue
- func (q *BufferedChannelQueue) Close()
- func (q *BufferedChannelQueue) Count() int
- func (q *BufferedChannelQueue) GetBufferSizeMaximum() int
- func (q *BufferedChannelQueue) GetChannel() chan interface{}
- func (q *BufferedChannelQueue) GetFreeNodeHookPoolIntervalDuration() time.Duration
- func (q *BufferedChannelQueue) GetLoadFromPoolDuration() time.Duration
- func (q *BufferedChannelQueue) GetNodeHookPoolSize() int
- func (q *BufferedChannelQueue) IsClosed() bool
- func (q *BufferedChannelQueue) Offer(val interface{}) error
- func (q *BufferedChannelQueue) Poll() (interface{}, error)
- func (q *BufferedChannelQueue) Put(val interface{}) error
- func (q *BufferedChannelQueue) PutWithTimeout(val interface{}, timeout time.Duration) error
- func (q *BufferedChannelQueue) SetBufferSizeMaximum(size int) *BufferedChannelQueue
- func (q *BufferedChannelQueue) SetFreeNodeHookPoolIntervalDuration(duration time.Duration) *BufferedChannelQueue
- func (q *BufferedChannelQueue) SetLoadFromPoolDuration(duration time.Duration) *BufferedChannelQueue
- func (q *BufferedChannelQueue) SetNodeHookPoolSize(size int) *BufferedChannelQueue
- func (q *BufferedChannelQueue) Take() (interface{}, error)
- func (q *BufferedChannelQueue) TakeWithTimeout(timeout time.Duration) (interface{}, error)
- type ChannelQueue
- func (q ChannelQueue) Offer(val interface{}) error
- func (q ChannelQueue) Poll() (interface{}, error)
- func (q ChannelQueue) Put(val interface{}) error
- func (q ChannelQueue) PutWithTimeout(val interface{}, timeout time.Duration) error
- func (q ChannelQueue) Take() (interface{}, error)
- func (q ChannelQueue) TakeWithTimeout(timeout time.Duration) (interface{}, error)
- type CompData
- type CompType
- type CompTypePatternDef
- type Comparable
- type Comparator
- type ConcurrentQueue
- type ConcurrentStack
- type CorDef
- func (corSelf *CorDef) DoNotation(effect func(*CorDef) interface{}) interface{}
- func (corSelf *CorDef) IsDone() bool
- func (corSelf *CorDef) IsStarted() bool
- func (corSelf *CorDef) New(effect func()) *CorDef
- func (corSelf *CorDef) NewAndStart(effect func()) *CorDef
- func (corSelf *CorDef) Start()
- func (corSelf *CorDef) StartWithVal(in interface{})
- func (corSelf *CorDef) Yield() interface{}
- func (corSelf *CorDef) YieldFrom(target *CorDef, in interface{}) interface{}
- func (corSelf *CorDef) YieldFromIO(target *MonadIODef) interface{}
- func (corSelf *CorDef) YieldRef(out interface{}) interface{}
- type CorOp
- type CurryDef
- type DoublyListItem
- func (listItem *DoublyListItem) AddFirst(input *DoublyListItem) *DoublyListItem
- func (listItem *DoublyListItem) AddLast(input *DoublyListItem) *DoublyListItem
- func (listItem *DoublyListItem) Count() int
- func (listItem *DoublyListItem) First() *DoublyListItem
- func (listItem *DoublyListItem) Last() *DoublyListItem
- type EqualPatternDef
- type FieldSortDescriptor
- type HandlerDef
- func (handlerSelf *HandlerDef) Close()
- func (handlerSelf *HandlerDef) GetDefault() *HandlerDef
- func (handlerSelf *HandlerDef) IsClosed() bool
- func (handlerSelf *HandlerDef) New() *HandlerDef
- func (handlerSelf *HandlerDef) NewByCh(ioCh chan func()) *HandlerDef
- func (handlerSelf *HandlerDef) Post(fn func())
- type KindPatternDef
- type LinkedListItem
- type LinkedListQueue
- func (q *LinkedListQueue) Clear()
- func (q *LinkedListQueue) ClearNodePool()
- func (q *LinkedListQueue) Count() int
- func (q *LinkedListQueue) KeepNodePoolCount(n int)
- func (q *LinkedListQueue) Offer(val interface{}) error
- func (q *LinkedListQueue) Peek() (interface{}, error)
- func (q *LinkedListQueue) Poll() (interface{}, error)
- func (q *LinkedListQueue) Pop() (interface{}, error)
- func (q *LinkedListQueue) Push(val interface{}) error
- func (q *LinkedListQueue) Put(val interface{}) error
- func (q *LinkedListQueue) Shift() (interface{}, error)
- func (q *LinkedListQueue) Take() (interface{}, error)
- func (q *LinkedListQueue) Unshift(val interface{}) error
- type MaybeDef
- type MonadIODef
- func (monadIOSelf *MonadIODef) Eval() interface{}
- func (monadIOSelf *MonadIODef) FlatMap(fn func(interface{}) *MonadIODef) *MonadIODef
- func (monadIOSelf MonadIODef) Just(in interface{}) *MonadIODef
- func (monadIOSelf *MonadIODef) New(effect func() interface{}) *MonadIODef
- func (monadIOSelf *MonadIODef) ObserveOn(h *HandlerDef) *MonadIODef
- func (monadIOSelf *MonadIODef) Subscribe(s Subscription) *Subscription
- func (monadIOSelf *MonadIODef) SubscribeOn(h *HandlerDef) *MonadIODef
- type NilTypeDef
- type OtherwisePatternDef
- type PMapOption
- type Pattern
- type PatternMatching
- type Predicate
- type PredicateErr
- type ProductType
- type PublisherDef
- func (publisherSelf *PublisherDef) Map(fn func(interface{}) interface{}) *PublisherDef
- func (publisherSelf *PublisherDef) New() *PublisherDef
- func (publisherSelf *PublisherDef) Publish(result interface{})
- func (publisherSelf *PublisherDef) Subscribe(sub Subscription) *Subscription
- func (publisherSelf *PublisherDef) SubscribeOn(h *HandlerDef) *PublisherDef
- func (publisherSelf *PublisherDef) Unsubscribe(s *Subscription)
- type Queue
- type ReducerFunctor
- type RegexPatternDef
- type SetDef
- func (setSelf *SetDef) Add(input ...interface{}) *SetDef
- func (setSelf *SetDef) Clone() *SetDef
- func (setSelf *SetDef) ContainsKey(input interface{}) bool
- func (setSelf *SetDef) ContainsValue(input interface{}) bool
- func (setSelf *SetDef) Get(key interface{}) interface{}
- func (setSelf *SetDef) Intersection(input *SetDef) *SetDef
- func (setSelf *SetDef) IsSubsetByKey(input *SetDef) bool
- func (setSelf *SetDef) IsSupersetByKey(input *SetDef) bool
- func (setSelf *SetDef) Keys() []interface{}
- func (setSelf *SetDef) MapKey(fn TransformerFunctor) *SetDef
- func (setSelf *SetDef) MapValue(fn TransformerFunctor) *SetDef
- func (setSelf *SetDef) Minus(input *SetDef) *SetDef
- func (setSelf *SetDef) RemoveKeys(input ...interface{}) *SetDef
- func (setSelf *SetDef) RemoveValues(input ...interface{}) *SetDef
- func (setSelf *SetDef) Set(key interface{}, value interface{})
- func (setSelf *SetDef) Size() int
- func (setSelf *SetDef) Union(input *SetDef) *SetDef
- func (setSelf *SetDef) Values() []interface{}
- type SimpleSortDescriptor
- type SortDescriptor
- type SortDescriptorsBuilder
- func (builder SortDescriptorsBuilder) GetSortDescriptors() []SortDescriptor
- func (builder SortDescriptorsBuilder) Sort(input []interface{})
- func (builder SortDescriptorsBuilder) ThenWith(input ...SortDescriptor) SortDescriptorsBuilder
- func (builder SortDescriptorsBuilder) ThenWithFieldName(fieldName string, ascending bool) SortDescriptorsBuilder
- func (builder SortDescriptorsBuilder) ThenWithTransformerFunctor(transformFn TransformerFunctor, ascending bool) SortDescriptorsBuilder
- func (builder SortDescriptorsBuilder) ToSortedList(input ...interface{}) []interface{}
- type Stack
- type StreamDef
- func (streamSelf *StreamDef) Append(item ...interface{}) *StreamDef
- func (streamSelf *StreamDef) Clone() *StreamDef
- func (streamSelf *StreamDef) Concat(slices ...[]interface{}) *StreamDef
- func (streamSelf *StreamDef) Contains(input interface{}) bool
- func (streamSelf *StreamDef) Distinct() *StreamDef
- func (streamSelf *StreamDef) Extend(streams ...*StreamDef) *StreamDef
- func (streamSelf *StreamDef) Filter(fn func(interface{}, int) bool) *StreamDef
- func (streamSelf *StreamDef) FilterNotNil() *StreamDef
- func (streamSelf *StreamDef) From(list ...interface{}) *StreamDef
- func (streamSelf *StreamDef) FromArray(list []interface{}) *StreamDef
- func (streamSelf *StreamDef) FromArrayBool(old []bool) *StreamDef
- func (streamSelf *StreamDef) FromArrayByte(old []byte) *StreamDef
- func (streamSelf *StreamDef) FromArrayFloat32(old []float32) *StreamDef
- func (streamSelf *StreamDef) FromArrayFloat64(old []float64) *StreamDef
- func (streamSelf *StreamDef) FromArrayInt(old []int) *StreamDef
- func (streamSelf *StreamDef) FromArrayInt16(old []int16) *StreamDef
- func (streamSelf *StreamDef) FromArrayInt32(old []int32) *StreamDef
- func (streamSelf *StreamDef) FromArrayInt64(old []int64) *StreamDef
- func (streamSelf *StreamDef) FromArrayInt8(old []int8) *StreamDef
- func (streamSelf *StreamDef) FromArrayMaybe(old []MaybeDef) *StreamDef
- func (streamSelf *StreamDef) FromArrayString(old []string) *StreamDef
- func (streamSelf *StreamDef) Get(i int) interface{}
- func (streamSelf *StreamDef) Intersection(input *StreamDef) *StreamDef
- func (streamSelf *StreamDef) IsSubset(input *StreamDef) bool
- func (streamSelf *StreamDef) IsSuperset(input *StreamDef) bool
- func (streamSelf *StreamDef) Len() int
- func (streamSelf *StreamDef) Map(fn func(interface{}, int) interface{}) *StreamDef
- func (streamSelf *StreamDef) Minus(input *StreamDef) *StreamDef
- func (streamSelf *StreamDef) Reject(fn func(interface{}, int) bool) *StreamDef
- func (streamSelf *StreamDef) Remove(index int) *StreamDef
- func (streamSelf *StreamDef) RemoveItem(input ...interface{}) *StreamDef
- func (streamSelf *StreamDef) Reverse() *StreamDef
- func (streamSelf *StreamDef) Sort(fn Comparator) *StreamDef
- func (streamSelf *StreamDef) SortByIndex(fn func(a, b int) bool) *StreamDef
- func (streamSelf *StreamDef) ToArray() []interface{}
- type StreamSetDef
- func NewStreamSet() *StreamSetDef
- func StreamSetFrom(list ...interface{}) *StreamSetDef
- func StreamSetFromArray(list []interface{}) *StreamSetDef
- func StreamSetFromArrayInterface(list []interface{}) *StreamSetDef
- func StreamSetFromInterface(list ...interface{}) *StreamSetDef
- func StreamSetFromMap(theMap map[interface{}]*StreamDef) *StreamSetDef
- func (streamSetSelf *StreamSetDef) Clone() *StreamSetDef
- func (streamSetSelf *StreamSetDef) Intersection(input *StreamSetDef) *StreamSetDef
- func (streamSetSelf *StreamSetDef) IsSubsetByKey(input *StreamSetDef) bool
- func (streamSetSelf *StreamSetDef) IsSupersetByKey(input *StreamSetDef) bool
- func (streamSetSelf *StreamSetDef) Minus(input *StreamSetDef) *StreamSetDef
- func (streamSetSelf *StreamSetDef) MinusStreams(input *StreamSetDef) *StreamSetDef
- func (streamSetSelf *StreamSetDef) Union(input *StreamSetDef) *StreamSetDef
- type Subscription
- type SumType
- type Transformer
- type TransformerFunctor
Constants ¶
This section is empty.
Variables ¶
var ( // ErrConversionUnsupported Conversion Unsupported ErrConversionUnsupported = errors.New("unsupported") // ErrConversionNil Conversion Nil ErrConversionNil = errors.New("<nil>") // ErrConversionNil Conversion Size Overflow ErrConversionSizeOverflow = errors.New("size overflow") )
var ( // ErrQueueIsEmpty Queue Is Empty ErrQueueIsEmpty = errors.New("queue is empty") // ErrQueueIsFull Queue Is Full ErrQueueIsFull = errors.New("queue is full") // ErrQueueIsClosed Queue Is Closed ErrQueueIsClosed = errors.New("queue is closed") // ErrQueueTakeTimeout Queue Take Timeout ErrQueueTakeTimeout = errors.New("queue take timeout") // ErrQueuePutTimeout Queue Put Timeout ErrQueuePutTimeout = errors.New("queue put timeout") // ErrStackIsEmpty Stack Is Empty ErrStackIsEmpty = errors.New("stack is empty") // ErrStackIsFull Stack Is Full ErrStackIsFull = errors.New("stack is full") )
var ErrActorAskTimeout = fmt.Errorf("ErrActorAskTimeout")
var Maybe someDef
Maybe Maybe utils instance
var None = noneDef{someDef{/* contains filtered or unexported fields */}}
None None utils instance
Functions ¶
func Compose ¶
func Compose(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
Compose Compose the functions from right to left (Math: f(g(x)) Compose: Compose(f, g)(x))
func Concat ¶ added in v1.2.0
func Concat(mine []interface{}, slices ...[]interface{}) []interface{}
Concat Concat slices
func CurryParam1 ¶ added in v1.2.1
func CurryParam1(fn func(interface{}, ...interface{}) interface{}, a interface{}) func(...interface{}) interface{}
CurryParam1 Curry for 1 Param (for currying general fp functions simply)
func CurryParam1ForSlice1 ¶ added in v1.3.0
func CurryParam1ForSlice1(fn func(interface{}, []interface{}) interface{}, a interface{}) func(...interface{}) interface{}
CurryParam1ForSlice1 Curry for 1 Param (for currying general fp functions simply)
func CurryParam2 ¶ added in v1.2.1
func CurryParam2(fn func(interface{}, interface{}, ...interface{}) interface{}, a interface{}, b interface{}) func(...interface{}) interface{}
CurryParam2 Curry for 2 Params (for currying general fp functions simply)
func CurryParam3 ¶ added in v1.2.1
func CurryParam3(fn func(interface{}, interface{}, interface{}, ...interface{}) interface{}, a interface{}, b interface{}, c interface{}) func(...interface{}) interface{}
CurryParam3 Curry for 3 Params (for currying general fp functions simply)
func CurryParam4 ¶ added in v1.2.1
func CurryParam4(fn func(interface{}, interface{}, interface{}, interface{}, ...interface{}) interface{}, a interface{}, b interface{}, c interface{}, d interface{}) func(...interface{}) interface{}
CurryParam4 Curry for 4 Params (for currying general fp functions simply)
func CurryParam5 ¶ added in v1.2.1
func CurryParam5(fn func(interface{}, interface{}, interface{}, interface{}, interface{}, ...interface{}) interface{}, a interface{}, b interface{}, c interface{}, d interface{}, e interface{}) func(...interface{}) interface{}
CurryParam5 Curry for 5 Params (for currying general fp functions simply)
func CurryParam6 ¶ added in v1.2.1
func CurryParam6(fn func(interface{}, interface{}, interface{}, interface{}, interface{}, interface{}, ...interface{}) interface{}, a interface{}, b interface{}, c interface{}, d interface{}, e interface{}, f interface{}) func(...interface{}) interface{}
CurryParam6 Curry for 6 Params (for currying general fp functions simply)
func Dedupe ¶ added in v1.2.1
func Dedupe(list ...interface{}) []interface{}
Dedupe Returns a new list removing consecutive duplicates in list.
func Difference ¶ added in v1.2.1
func Difference(arrList ...[]interface{}) []interface{}
Difference returns a set that is the first set without elements of the remaining sets repeated value within list parameter will be ignored
func Distinct ¶ added in v1.2.1
func Distinct(list ...interface{}) []interface{}
Distinct removes duplicates.
Example
list := []int{8, 2, 8, 0, 2, 0} Distinct(list...) // returns [8, 2, 0]
func DistinctRandom ¶ added in v1.2.2
func DistinctRandom(list ...interface{}) []interface{}
DistinctRandom removes duplicates.(RandomOrder)
func Drop ¶ added in v1.2.1
func Drop(count int, list ...interface{}) []interface{}
Drop drops N item(s) from the list and returns new list. Returns empty list if there is only one item in the list or list empty
func DropEq ¶ added in v1.2.1
func DropEq(num interface{}, list ...interface{}) []interface{}
DropEq returns a new list after dropping the given item
Example:
DropEq(1, 1, 2, 3, 1) // returns [2, 3]
func DropLast ¶ added in v1.2.1
func DropLast(count int, list ...interface{}) []interface{}
DropLast drops last N item(s) from the list and returns new list. Returns empty list if there is only one item in the list or list empty
func DropWhile ¶ added in v1.2.1
func DropWhile(f Predicate, list ...interface{}) []interface{}
DropWhile drops the items from the list as long as condition satisfies.
Takes two inputs
- Function: takes one input and returns boolean
- list
Returns:
New List. Empty list if either one of arguments or both of them are nil
Example: Drops even number. Returns the remaining items once odd number is found in the list.
DropWhile(isEven, 4, 2, 3, 4, 5) // Returns [3, 4, 5] func isEven(num int) bool { return num%2 == 0 }
func DuplicateMap ¶ added in v1.2.2
func DuplicateMap(input map[interface{}]interface{}) map[interface{}]interface{}
DuplicateMap Return a new Map
func DuplicateSlice ¶ added in v1.2.1
func DuplicateSlice(list []interface{}) []interface{}
DuplicateSlice Return a new Slice
func Either ¶
func Either(value interface{}, patterns ...Pattern) interface{}
Either Match Pattern list and return the effect() result of the matching Pattern
func Every ¶ added in v1.2.1
Every returns true if supplied function returns logical true for every item in the list
Example:
Every(even, 8, 2, 10, 4) // Returns true func isEven(num int) bool { return num%2 == 0 }
Every(even) // Returns false Every(nil) // Returns false
func Exists ¶ added in v1.2.1
func Exists(input interface{}, list ...interface{}) bool
Exists checks if given item exists in the list
Example:
Exists(8, 8, 2, 10, 4) // Returns true Exists(8) // Returns false
func Filter ¶ added in v1.2.0
Filter Filter the values by the given predicate function (predicate func, slice)
func Flatten ¶ added in v1.2.1
func Flatten(list ...[]interface{}) []interface{}
Flatten creates a new slice where one level of nested elements are unnested
func GroupBy ¶ added in v1.2.1
func GroupBy(grouper TransformerFunctor, list ...interface{}) map[interface{}][]interface{}
GroupBy creates a map where the key is a group identifier and the value is a slice with the elements that have the same identifer
func Head ¶ added in v1.2.1
func Head(list ...interface{}) interface{}
Head returns first element of a slice
func Intersection ¶ added in v1.2.1
func Intersection(inputList ...[]interface{}) []interface{}
Intersection return a set that is the intersection of the input sets repeated value within list parameter will be ignored
func IntersectionMapByKey ¶ added in v1.2.1
func IntersectionMapByKey(inputList ...map[interface{}]interface{}) map[interface{}]interface{}
IntersectionMapByKey return a set that is the intersection of the input sets
func IsDistinct ¶ added in v1.2.1
func IsDistinct(list ...interface{}) bool
IsDistinct returns true if no two of the arguments are =
func IsEqual ¶ added in v1.2.1
func IsEqual(list1, list2 []interface{}) bool
IsEqual Returns true if both list are equal else returns false
func IsEqualMap ¶ added in v1.2.1
func IsEqualMap(map1, map2 map[interface{}]interface{}) bool
IsEqualMap Returns true if both maps are equal else returns false
func IsSubset ¶ added in v1.2.1
func IsSubset(list1, list2 []interface{}) bool
IsSubset returns true or false by checking if set1 is a subset of set2 repeated value within list parameter will be ignored
func IsSubsetMapByKey ¶ added in v1.2.1
func IsSubsetMapByKey(item1, item2 map[interface{}]interface{}) bool
IsSubsetMapByKey returns true or false by checking if set1 is a subset of set2
func IsSuperset ¶ added in v1.2.1
func IsSuperset(list1, list2 []interface{}) bool
IsSuperset returns true or false by checking if set1 is a superset of set2 repeated value within list parameter will be ignored
func IsSupersetMapByKey ¶ added in v1.2.1
func IsSupersetMapByKey(item1, item2 map[interface{}]interface{}) bool
IsSupersetMapByKey returns true or false by checking if set1 is a superset of set2
func IsZero ¶ added in v1.2.1
func IsZero(v interface{}) bool
IsZero Returns true if num is zero, else false
func Keys ¶ added in v1.2.1
func Keys(m map[interface{}]interface{}) []interface{}
Keys returns a slice of map's keys
func MakeNumericReturnForParam1ReturnBool1 ¶ added in v1.2.3
func MakeNumericReturnForParam1ReturnBool1(fn func(interface{}) bool) func(...interface{}) []interface{}
MakeNumericReturnForParam1ReturnBool1 Make Numeric 1 bool Return (for compose() general fp functions simply)
func MakeNumericReturnForSliceParamReturnBool1 ¶ added in v1.3.0
func MakeNumericReturnForSliceParamReturnBool1(fn func([]interface{}) bool) func(...interface{}) []interface{}
MakeNumericReturnForSliceParamReturnBool1 Make Numeric 1 bool Return (for compose() general fp functions simply)
func MakeNumericReturnForVariadicParamReturnBool1 ¶ added in v1.2.3
func MakeNumericReturnForVariadicParamReturnBool1(fn func(...interface{}) bool) func(...interface{}) []interface{}
MakeNumericReturnForVariadicParamReturnBool1 Make Numeric 1 bool Return (for compose() general fp functions simply)
func MakeVariadicParam1 ¶ added in v1.2.1
func MakeVariadicParam1(fn func(interface{}) []interface{}) func(...interface{}) []interface{}
MakeVariadicParam1 MakeVariadic for 1 Param (for compose() general fp functions simply)
func MakeVariadicParam2 ¶ added in v1.2.1
func MakeVariadicParam2(fn func(interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
MakeVariadicParam2 MakeVariadic for 2 Params (for compose() general fp functions simply)
func MakeVariadicParam3 ¶ added in v1.2.1
func MakeVariadicParam3(fn func(interface{}, interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
MakeVariadicParam3 MakeVariadic for 3 Params (for compose() general fp functions simply)
func MakeVariadicParam4 ¶ added in v1.2.1
func MakeVariadicParam4(fn func(interface{}, interface{}, interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
MakeVariadicParam4 MakeVariadic for 4 Params (for compose() general fp functions simply)
func MakeVariadicParam5 ¶ added in v1.2.1
func MakeVariadicParam5(fn func(interface{}, interface{}, interface{}, interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
MakeVariadicParam5 MakeVariadic for 5 Params (for compose() general fp functions simply)
func MakeVariadicParam6 ¶ added in v1.2.1
func MakeVariadicParam6(fn func(interface{}, interface{}, interface{}, interface{}, interface{}, interface{}) []interface{}) func(...interface{}) []interface{}
MakeVariadicParam6 MakeVariadic for 6 Params (for compose() general fp functions simply)
func MakeVariadicReturn1 ¶ added in v1.2.1
func MakeVariadicReturn1(fn func(...interface{}) interface{}) func(...interface{}) []interface{}
MakeVariadicReturn1 MakeVariadic for 1 Return value (for compose() general fp functions simply)
func MakeVariadicReturn2 ¶ added in v1.2.1
func MakeVariadicReturn2(fn func(...interface{}) (interface{}, interface{})) func(...interface{}) []interface{}
MakeVariadicReturn2 MakeVariadic for 2 Return values (for compose() general fp functions simply)
func MakeVariadicReturn3 ¶ added in v1.2.1
func MakeVariadicReturn3(fn func(...interface{}) (interface{}, interface{}, interface{})) func(...interface{}) []interface{}
MakeVariadicReturn3 MakeVariadic for 3 Return values (for compose() general fp functions simply)
func MakeVariadicReturn4 ¶ added in v1.2.1
func MakeVariadicReturn4(fn func(...interface{}) (interface{}, interface{}, interface{}, interface{})) func(...interface{}) []interface{}
MakeVariadicReturn4 MakeVariadic for 4 Return values (for compose() general fp functions simply)
func MakeVariadicReturn5 ¶ added in v1.2.1
func MakeVariadicReturn5(fn func(...interface{}) (interface{}, interface{}, interface{}, interface{}, interface{})) func(...interface{}) []interface{}
MakeVariadicReturn5 MakeVariadic for 5 Return values (for compose() general fp functions simply)
func MakeVariadicReturn6 ¶ added in v1.2.1
func MakeVariadicReturn6(fn func(...interface{}) (interface{}, interface{}, interface{}, interface{}, interface{}, interface{})) func(...interface{}) []interface{}
MakeVariadicReturn6 MakeVariadic for 6 Return values (for compose() general fp functions simply)
func Map ¶ added in v1.2.0
func Map(fn TransformerFunctor, values ...interface{}) []interface{}
Map Map the values to the function from left to right
func MapIndexed ¶ added in v1.2.0
func MapIndexed(fn func(interface{}, int) interface{}, values ...interface{}) []interface{}
MapIndexed Map the values to the function from left to right
func MatchCompType ¶
MatchCompType Check does the Composite Data match the given SumType
func MatchCompTypeRef ¶
MatchCompTypeRef Check does the Composite Data match the given SumType
func Merge ¶ added in v1.2.1
func Merge(map1, map2 map[interface{}]interface{}) map[interface{}]interface{}
Merge takes two inputs: map[interface{}]interface{} and map[interface{}]interface{} and merge two maps and returns a new map[interface{}]interface{}.
func Minus ¶ added in v1.2.1
func Minus(set1, set2 []interface{}) []interface{}
Minus all of set1 but not in set2
func MinusMapByKey ¶ added in v1.2.1
func MinusMapByKey(set1, set2 map[interface{}]interface{}) map[interface{}]interface{}
MinusMapByKey all of set1 but not in set2
func PMap ¶ added in v1.2.1
func PMap(f TransformerFunctor, option *PMapOption, list ...interface{}) []interface{}
PMap applies the function(1st argument) on each item in the list and returns a new list.
Order of new list is guaranteed. This feature can be disabled by passing: PMapOption{RandomOrder: true} to gain performance Run in parallel. no_of_goroutines = no_of_items_in_list or 3rd argument can be passed to fix the number of goroutines.
Takes 3 inputs. 3rd argument is option
- Function - takes 1 input
- optional argument - PMapOption{FixedPool: <some_number>}
- List
func Partition ¶ added in v1.2.1
func Partition(predicate Predicate, list ...interface{}) [][]interface{}
Partition splits elements into two groups - one where the predicate is satisfied and one where the predicate is not
func Pipe ¶ added in v1.2.0
func Pipe(fnList ...func(...interface{}) []interface{}) func(...interface{}) []interface{}
Pipe Pipe the functions from left to right
func Prepend ¶ added in v1.2.1
func Prepend(element interface{}, list []interface{}) []interface{}
Prepend returns the slice with the additional element added to the beginning
func Reduce ¶ added in v1.2.0
func Reduce(fn ReducerFunctor, memo interface{}, input ...interface{}) interface{}
Reduce Reduce the values from left to right(func(memo,val), starting value, slice)
func ReduceIndexed ¶ added in v1.2.0
func ReduceIndexed(fn func(interface{}, interface{}, int) interface{}, memo interface{}, input ...interface{}) interface{}
ReduceIndexed Reduce the values from left to right(func(memo,val,index), starting value, slice)
func Reject ¶ added in v1.2.0
Reject Reject the values by the given predicate function (predicate func, slice)
func Reverse ¶ added in v1.2.1
func Reverse(list ...interface{}) []interface{}
Reverse reverse the list
func SliceOf ¶ added in v1.1.3
func SliceOf(args ...interface{}) []interface{}
SliceOf Return Slice of varargs
func SliceToMap ¶ added in v1.2.1
func SliceToMap(defaultValue interface{}, input ...interface{}) map[interface{}]interface{}
SliceToMap Return Slice of varargs
func Some ¶ added in v1.2.1
Some finds item in the list based on supplied function.
Takes 2 input:
- Function
- List
Returns:
bool. True if condition satisfies, else false
Example:
Some(isEven, 8, 2, 10, 4) // Returns true Some(isEven, 1, 3, 5, 7) // Returns false Some(nil) // Returns false func isEven(num int) bool { return num%2 == 0 }
func Sort ¶ added in v1.2.0
func Sort(fn Comparator, input []interface{})
Sort Sort items by Comparator
func SortBySortDescriptors ¶ added in v1.2.0
func SortBySortDescriptors(sortDescriptors []SortDescriptor, input []interface{})
SortBySortDescriptors Sort items by sortDescriptors
func SortSlice ¶ added in v1.2.0
func SortSlice(fn Comparator, input ...interface{}) []interface{}
SortSlice Sort items by Comparator
func SortedListBySortDescriptors ¶ added in v1.2.0
func SortedListBySortDescriptors(sortDescriptors []SortDescriptor, input ...interface{}) []interface{}
SortedListBySortDescriptors Sort items by sortDescriptors and return value
func SplitEvery ¶ added in v1.2.1
func SplitEvery(size int, list ...interface{}) [][]interface{}
SplitEvery returns elements in equal length slices
func Tail ¶ added in v1.2.1
func Tail(list ...interface{}) []interface{}
Tail returns the input slice with all elements except the first element
func Take ¶ added in v1.2.1
func Take(count int, list ...interface{}) []interface{}
Take returns the first n elements of the slice
func TakeLast ¶ added in v1.2.1
func TakeLast(count int, list ...interface{}) []interface{}
TakeLast returns the last n elements of the slice
func Trampoline ¶ added in v1.2.1
func Trampoline(fn func(...interface{}) ([]interface{}, bool, error), input ...interface{}) ([]interface{}, error)
Trampoline Trampoline
func Union ¶ added in v1.2.1
func Union(arrList ...[]interface{}) []interface{}
Union return a set that is the union of the input sets repeated value within list parameter will be ignored
func UniqBy ¶ added in v1.2.1
func UniqBy(identify TransformerFunctor, list ...interface{}) []interface{}
UniqBy returns a slice of only unique values based on a comparable identifier
Types ¶
type ActorDef ¶ added in v1.3.5
type ActorDef struct {
// contains filtered or unexported fields
}
ActorDef Actor model inspired by Erlang/Akka
var Actor ActorDef
Actor Actor utils instance
func (*ActorDef) GetDefault ¶ added in v1.3.5
GetDefault Get Default Actor
func (*ActorDef) NewByOptions ¶ added in v1.3.5
func (actorSelf *ActorDef) NewByOptions(effect func(*ActorDef, interface{}), ioCh chan interface{}, context map[string]interface{}) *ActorDef
NewByOptions New Actor by its options
type ActorHandle ¶ added in v1.3.7
type ActorHandle interface {
Send(message interface{})
}
ActorHandle A target could send messages
type AskDef ¶ added in v1.3.7
type AskDef struct { Message interface{} // contains filtered or unexported fields }
AskDef Ask inspired by Erlang/Akka
var Ask AskDef
Ask Ask utils instance
func AskNewByOptionsGenerics ¶ added in v1.3.7
func AskNewByOptionsGenerics(message interface{}, ioCh chan interface{}) *AskDef
AskNewByOptionsGenerics New Ask by its options
func AskNewGenerics ¶ added in v1.3.7
func AskNewGenerics(message interface{}) *AskDef
AskNewGenerics New Ask instance
func (*AskDef) AskChannel ¶ added in v1.3.7
func (askSelf *AskDef) AskChannel(target ActorHandle) chan interface{}
AskChannel Sender Ask
func (*AskDef) AskOnce ¶ added in v1.3.7
func (askSelf *AskDef) AskOnce(target ActorHandle) interface{}
AskOnce Sender Ask
func (*AskDef) AskOnceWithTimeout ¶ added in v1.4.3
func (askSelf *AskDef) AskOnceWithTimeout(target ActorHandle, timeout time.Duration) (interface{}, error)
AskOnce Sender Ask with timeout
func (*AskDef) NewByOptions ¶ added in v1.3.7
NewByOptions New Ask by its options
type AtomBool ¶
type AtomBool struct {
// contains filtered or unexported fields
}
AtomBool Atomic Bool
type BufferedChannelQueue ¶ added in v1.4.0
type BufferedChannelQueue struct {
// contains filtered or unexported fields
}
BufferedChannelQueue BlockingQueue with ChannelQueue & scalable pool, inspired by Collection utils
func NewBufferedChannelQueue ¶ added in v1.4.0
func NewBufferedChannelQueue(channelCapacity int, bufferSizeMaximum int, nodeHookPoolSize int) *BufferedChannelQueue
NewBufferedChannelQueue New BufferedChannelQueue instance from a Queue
func (*BufferedChannelQueue) Close ¶ added in v1.4.0
func (q *BufferedChannelQueue) Close()
Close Close the BufferedChannelQueue
func (*BufferedChannelQueue) Count ¶ added in v1.4.6
func (q *BufferedChannelQueue) Count() int
Count Count items
func (*BufferedChannelQueue) GetBufferSizeMaximum ¶ added in v1.4.4
func (q *BufferedChannelQueue) GetBufferSizeMaximum() int
GetBufferSizeMaximum Get MaximumBufferSize(maximum number of buffered items outside the ChannelQueue)
func (*BufferedChannelQueue) GetChannel ¶ added in v1.4.6
func (q *BufferedChannelQueue) GetChannel() chan interface{}
GetChannel Get Channel(for Selecting channels usages)
func (*BufferedChannelQueue) GetFreeNodeHookPoolIntervalDuration ¶ added in v1.4.4
func (q *BufferedChannelQueue) GetFreeNodeHookPoolIntervalDuration() time.Duration
GetFreeNodeHookPoolIntervalDuration Get freeNodeHookPoolIntervalDuration(the interval to clear buffering node hooks down to nodeHookPoolSize)
func (*BufferedChannelQueue) GetLoadFromPoolDuration ¶ added in v1.4.4
func (q *BufferedChannelQueue) GetLoadFromPoolDuration() time.Duration
GetLoadFromPoolDuration Get loadFromPoolDuration(the interval to take buffered items into the ChannelQueue)
func (*BufferedChannelQueue) GetNodeHookPoolSize ¶ added in v1.4.4
func (q *BufferedChannelQueue) GetNodeHookPoolSize() int
GetNodeHookPoolSize Get nodeHookPoolSize(the buffering node hooks ideal size)
func (*BufferedChannelQueue) IsClosed ¶ added in v1.4.4
func (q *BufferedChannelQueue) IsClosed() bool
IsClosed Is the BufferedChannelQueue closed
func (*BufferedChannelQueue) Offer ¶ added in v1.4.0
func (q *BufferedChannelQueue) Offer(val interface{}) error
Offer Offer the val(non-blocking)
func (*BufferedChannelQueue) Poll ¶ added in v1.4.0
func (q *BufferedChannelQueue) Poll() (interface{}, error)
Poll Poll the val(non-blocking)
func (*BufferedChannelQueue) Put ¶ added in v1.4.0
func (q *BufferedChannelQueue) Put(val interface{}) error
Put Put the val(non-blocking)
func (*BufferedChannelQueue) PutWithTimeout ¶ added in v1.5.4
func (q *BufferedChannelQueue) PutWithTimeout(val interface{}, timeout time.Duration) error
PutWithTimeout Put the T val(blocking), with timeout
func (*BufferedChannelQueue) SetBufferSizeMaximum ¶ added in v1.4.0
func (q *BufferedChannelQueue) SetBufferSizeMaximum(size int) *BufferedChannelQueue
SetBufferSizeMaximum Set MaximumBufferSize(maximum number of buffered items outside the ChannelQueue)
func (*BufferedChannelQueue) SetFreeNodeHookPoolIntervalDuration ¶ added in v1.4.0
func (q *BufferedChannelQueue) SetFreeNodeHookPoolIntervalDuration(duration time.Duration) *BufferedChannelQueue
SetFreeNodeHookPoolIntervalDuration Set freeNodeHookPoolIntervalDuration(the interval to clear buffering node hooks down to nodeHookPoolSize)
func (*BufferedChannelQueue) SetLoadFromPoolDuration ¶ added in v1.4.0
func (q *BufferedChannelQueue) SetLoadFromPoolDuration(duration time.Duration) *BufferedChannelQueue
SetLoadFromPoolDuration Set loadFromPoolDuration(the interval to take buffered items into the ChannelQueue)
func (*BufferedChannelQueue) SetNodeHookPoolSize ¶ added in v1.4.0
func (q *BufferedChannelQueue) SetNodeHookPoolSize(size int) *BufferedChannelQueue
SetNodeHookPoolSize Set nodeHookPoolSize(the buffering node hooks ideal size)
func (*BufferedChannelQueue) Take ¶ added in v1.4.0
func (q *BufferedChannelQueue) Take() (interface{}, error)
Take Take the val(blocking)
func (*BufferedChannelQueue) TakeWithTimeout ¶ added in v1.4.0
func (q *BufferedChannelQueue) TakeWithTimeout(timeout time.Duration) (interface{}, error)
TakeWithTimeout Take the val(blocking), with timeout
type ChannelQueue ¶ added in v1.4.0
type ChannelQueue chan interface{}
ChannelQueue ChannelQueue inspired by Collection utils
func NewChannelQueue ¶ added in v1.4.0
func NewChannelQueue(capacity int) ChannelQueue
NewChannelQueue New ChannelQueue instance with capacity
func (ChannelQueue) Offer ¶ added in v1.4.0
func (q ChannelQueue) Offer(val interface{}) error
Offer Offer the val(non-blocking)
func (ChannelQueue) Poll ¶ added in v1.4.0
func (q ChannelQueue) Poll() (interface{}, error)
Poll Poll the val(non-blocking)
func (ChannelQueue) Put ¶ added in v1.4.0
func (q ChannelQueue) Put(val interface{}) error
Put Put the val(blocking)
func (ChannelQueue) PutWithTimeout ¶ added in v1.4.0
func (q ChannelQueue) PutWithTimeout(val interface{}, timeout time.Duration) error
PutWithTimeout Put the val(blocking), with timeout
func (ChannelQueue) Take ¶ added in v1.4.0
func (q ChannelQueue) Take() (interface{}, error)
Take Take the val(blocking)
func (ChannelQueue) TakeWithTimeout ¶ added in v1.4.0
func (q ChannelQueue) TakeWithTimeout(timeout time.Duration) (interface{}, error)
TakeWithTimeout Take the val(blocking), with timeout
type CompData ¶
type CompData struct {
// contains filtered or unexported fields
}
CompData Composite Data with values & its CompType(SumType)
func NewCompData ¶
NewCompData New SumType Data by its type and composite values
type CompType ¶
type CompType interface {
Matches(value ...interface{}) bool
}
CompType Abstract SumType concept interface
func DefProduct ¶
DefProduct Define the ProductType of a SumType
type CompTypePatternDef ¶
type CompTypePatternDef struct {
// contains filtered or unexported fields
}
CompTypePatternDef Pattern which matching when the SumType matches
func (CompTypePatternDef) Apply ¶
func (patternSelf CompTypePatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (CompTypePatternDef) Matches ¶
func (patternSelf CompTypePatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type Comparable ¶ added in v1.2.0
type Comparable interface {
CompareTo(interface{}) int
}
Comparable Comparable interface able to be compared
type Comparator ¶ added in v1.2.0
type Comparator func(interface{}, interface{}) bool
Comparator Comparator Functor
type ConcurrentQueue ¶ added in v1.4.0
type ConcurrentQueue struct {
// contains filtered or unexported fields
}
ConcurrentQueue ConcurrentQueue inspired by Collection utils
func NewConcurrentQueue ¶ added in v1.4.0
func NewConcurrentQueue(queue Queue) *ConcurrentQueue
NewConcurrentQueue New ConcurrentQueue instance from a Queue
func (*ConcurrentQueue) Offer ¶ added in v1.4.0
func (q *ConcurrentQueue) Offer(val interface{}) error
Offer Offer the val(non-blocking)
func (*ConcurrentQueue) Poll ¶ added in v1.4.0
func (q *ConcurrentQueue) Poll() (interface{}, error)
Poll Poll the val(non-blocking)
func (*ConcurrentQueue) Put ¶ added in v1.4.0
func (q *ConcurrentQueue) Put(val interface{}) error
Put Put the val(probably blocking)
func (*ConcurrentQueue) Take ¶ added in v1.4.0
func (q *ConcurrentQueue) Take() (interface{}, error)
Take Take the val(probably blocking)
type ConcurrentStack ¶ added in v1.4.2
type ConcurrentStack struct {
// contains filtered or unexported fields
}
ConcurrentStack ConcurrentStack inspired by Collection utils
func NewConcurrentStack ¶ added in v1.4.2
func NewConcurrentStack(stack Stack) *ConcurrentStack
NewConcurrentStack New ConcurrentStack instance from a Stack
func (*ConcurrentStack) Pop ¶ added in v1.4.2
func (q *ConcurrentStack) Pop() (interface{}, error)
Take Take the val(probably blocking)
func (*ConcurrentStack) Push ¶ added in v1.4.2
func (q *ConcurrentStack) Push(val interface{}) error
Put Put the val(probably blocking)
type CorDef ¶
type CorDef struct {
// contains filtered or unexported fields
}
CorDef Cor Coroutine inspired by Python/Ecmascript/Lua
var Cor CorDef
Cor Cor utils instance
func (*CorDef) DoNotation ¶
DoNotation Do Notation by function (inspired by Haskell one)
func (*CorDef) NewAndStart ¶
NewAndStart New a Cor instance and start it immediately
func (*CorDef) StartWithVal ¶ added in v1.1.0
func (corSelf *CorDef) StartWithVal(in interface{})
StartWithVal Start the Cor with an initial value
func (*CorDef) YieldFromIO ¶
func (corSelf *CorDef) YieldFromIO(target *MonadIODef) interface{}
YieldFromIO Yield from a given MonadIO
type CorOp ¶
type CorOp struct {
// contains filtered or unexported fields
}
CorOp Cor Yield Operation/Delegation/Callback
type CurryDef ¶
type CurryDef struct {
// contains filtered or unexported fields
}
CurryDef Curry inspired by Currying in Java ways
var Curry CurryDef
Curry Curry utils instance
func (*CurryDef) MarkDone ¶
func (currySelf *CurryDef) MarkDone()
MarkDone Mark the currying is done(let others know it)
type DoublyListItem ¶ added in v1.4.0
type DoublyListItem struct { Next *DoublyListItem Prev *DoublyListItem Val *interface{} }
DoublyListItem DoublyListItem inspired by Collection utils
func (*DoublyListItem) AddFirst ¶ added in v1.4.0
func (listItem *DoublyListItem) AddFirst(input *DoublyListItem) *DoublyListItem
AddFirst Add the input item to the first position
func (*DoublyListItem) AddLast ¶ added in v1.4.0
func (listItem *DoublyListItem) AddLast(input *DoublyListItem) *DoublyListItem
AddLast Add the input item to the last
func (*DoublyListItem) Count ¶ added in v1.4.0
func (listItem *DoublyListItem) Count() int
Count Count items
func (*DoublyListItem) First ¶ added in v1.4.0
func (listItem *DoublyListItem) First() *DoublyListItem
First Get the First one
func (*DoublyListItem) Last ¶ added in v1.4.0
func (listItem *DoublyListItem) Last() *DoublyListItem
Last Get the Last one
type EqualPatternDef ¶
type EqualPatternDef struct {
// contains filtered or unexported fields
}
EqualPatternDef Pattern which matching when the given object is equal to predefined one
func (EqualPatternDef) Apply ¶
func (patternSelf EqualPatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (EqualPatternDef) Matches ¶
func (patternSelf EqualPatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type FieldSortDescriptor ¶ added in v1.2.0
type FieldSortDescriptor struct { SimpleSortDescriptor // contains filtered or unexported fields }
FieldSortDescriptor FieldSortDescriptor implemented by Reflection(by FieldName)
func NewFieldSortDescriptor ¶ added in v1.2.0
func NewFieldSortDescriptor(fieldName string, ascending bool) FieldSortDescriptor
NewFieldSortDescriptor Generate a new FieldSortDescriptor by FieldName & ascending(true)/descending(false)
func (FieldSortDescriptor) GetFieldName ¶ added in v1.2.0
func (descriptor FieldSortDescriptor) GetFieldName() string
GetFieldName Get the fieldName to sort
func (FieldSortDescriptor) SetFieldName ¶ added in v1.2.0
func (descriptor FieldSortDescriptor) SetFieldName(val string)
SetFieldName Set the fieldName to sort
func (FieldSortDescriptor) TransformedBy ¶ added in v1.2.0
func (descriptor FieldSortDescriptor) TransformedBy() TransformerFunctor
TransformedBy Get the TransformerFunctor of this SortDescriptor
type HandlerDef ¶
type HandlerDef struct {
// contains filtered or unexported fields
}
HandlerDef Handler inspired by Android/WebWorker
var Handler HandlerDef
Handler Handler utils instance
func (*HandlerDef) GetDefault ¶
func (handlerSelf *HandlerDef) GetDefault() *HandlerDef
GetDefault Get Default Handler
func (*HandlerDef) IsClosed ¶ added in v1.3.5
func (handlerSelf *HandlerDef) IsClosed() bool
IsClosed Check is Closed
func (*HandlerDef) NewByCh ¶
func (handlerSelf *HandlerDef) NewByCh(ioCh chan func()) *HandlerDef
NewByCh New Handler by its Channel
func (*HandlerDef) Post ¶
func (handlerSelf *HandlerDef) Post(fn func())
Post Post a function to execute on the Handler
type KindPatternDef ¶
type KindPatternDef struct {
// contains filtered or unexported fields
}
KindPatternDef Pattern which matching when the kind matches
func (KindPatternDef) Apply ¶
func (patternSelf KindPatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (KindPatternDef) Matches ¶
func (patternSelf KindPatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type LinkedListItem ¶ added in v1.4.0
type LinkedListItem struct { Next *LinkedListItem Val *interface{} }
LinkedListItem LinkedListItem inspired by Collection utils
func (*LinkedListItem) AddLast ¶ added in v1.4.0
func (listItem *LinkedListItem) AddLast(input *LinkedListItem) *LinkedListItem
AddLast Add the input item to the last
func (*LinkedListItem) Count ¶ added in v1.4.0
func (listItem *LinkedListItem) Count() int
Count Count items
func (*LinkedListItem) Last ¶ added in v1.4.0
func (listItem *LinkedListItem) Last() *LinkedListItem
Last Get the Last one
type LinkedListQueue ¶ added in v1.4.0
type LinkedListQueue struct {
// contains filtered or unexported fields
}
LinkedListQueue LinkedListQueue inspired by Collection utils
func NewLinkedListQueue ¶ added in v1.4.0
func NewLinkedListQueue() *LinkedListQueue
NewLinkedListQueue New LinkedListQueue instance
func (*LinkedListQueue) Clear ¶ added in v1.4.0
func (q *LinkedListQueue) Clear()
Clear Clear all data
func (*LinkedListQueue) ClearNodePool ¶ added in v1.4.0
func (q *LinkedListQueue) ClearNodePool()
ClearNodePool Clear cached LinkedListItem nodes in nodePool
func (*LinkedListQueue) Count ¶ added in v1.4.0
func (q *LinkedListQueue) Count() int
Count Count Items
func (*LinkedListQueue) KeepNodePoolCount ¶ added in v1.4.0
func (q *LinkedListQueue) KeepNodePoolCount(n int)
KeepNodePoolCount Decrease/Increase LinkedListItem nodes to n items
func (*LinkedListQueue) Offer ¶ added in v1.4.0
func (q *LinkedListQueue) Offer(val interface{}) error
Offer Offer the val to the last position(non-blocking)
func (*LinkedListQueue) Peek ¶ added in v1.4.0
func (q *LinkedListQueue) Peek() (interface{}, error)
Peek Peek the val from the first position without removing it (non-blocking)
func (*LinkedListQueue) Poll ¶ added in v1.4.0
func (q *LinkedListQueue) Poll() (interface{}, error)
Poll Poll the val from the first position(non-blocking)
func (*LinkedListQueue) Pop ¶ added in v1.4.0
func (q *LinkedListQueue) Pop() (interface{}, error)
Pop Pop the data from the last position(non-blocking)
func (*LinkedListQueue) Push ¶ added in v1.4.0
func (q *LinkedListQueue) Push(val interface{}) error
Push Push the data to the last position(non-blocking)
func (*LinkedListQueue) Put ¶ added in v1.4.0
func (q *LinkedListQueue) Put(val interface{}) error
Put Put the val to the last position(no-blocking)
func (*LinkedListQueue) Shift ¶ added in v1.4.0
func (q *LinkedListQueue) Shift() (interface{}, error)
Shift Shift the val from the first position (non-blocking)
func (*LinkedListQueue) Take ¶ added in v1.4.0
func (q *LinkedListQueue) Take() (interface{}, error)
Take Take the val from the first position(no-blocking)
func (*LinkedListQueue) Unshift ¶ added in v1.4.0
func (q *LinkedListQueue) Unshift(val interface{}) error
Unshift Unshift the val to the first position(non-blocking)
type MaybeDef ¶
type MaybeDef interface { Just(in interface{}) MaybeDef Or(or interface{}) interface{} CloneTo(dest interface{}) MaybeDef Clone() MaybeDef FlatMap(fn func(interface{}) MaybeDef) MaybeDef ToString() string ToPtr() *interface{} ToMaybe() MaybeDef ToFloat64() (float64, error) ToFloat32() (float32, error) ToInt() (int, error) ToInt32() (int32, error) ToInt64() (int64, error) ToBool() (bool, error) Let(fn func()) Unwrap() interface{} IsPresent() bool IsNil() bool IsValid() bool IsPtr() bool Type() reflect.Type Kind() reflect.Kind IsType(t reflect.Type) bool IsKind(t reflect.Kind) bool }
MaybeDef Maybe inspired by Rx/Optional/Guava/Haskell
type MonadIODef ¶
type MonadIODef struct {
// contains filtered or unexported fields
}
MonadIODef MonadIO inspired by Rx/Observable
var MonadIO MonadIODef
MonadIO MonadIO utils instance
func (*MonadIODef) Eval ¶ added in v1.3.2
func (monadIOSelf *MonadIODef) Eval() interface{}
Eval Eval the value right now(sync)
func (*MonadIODef) FlatMap ¶
func (monadIOSelf *MonadIODef) FlatMap(fn func(interface{}) *MonadIODef) *MonadIODef
FlatMap FlatMap the MonadIO by function
func (MonadIODef) Just ¶
func (monadIOSelf MonadIODef) Just(in interface{}) *MonadIODef
Just New MonadIO by a given value
func (*MonadIODef) New ¶
func (monadIOSelf *MonadIODef) New(effect func() interface{}) *MonadIODef
New New MonadIO by effect function
func (*MonadIODef) ObserveOn ¶
func (monadIOSelf *MonadIODef) ObserveOn(h *HandlerDef) *MonadIODef
ObserveOn Observe the MonadIO on the specific Handler
func (*MonadIODef) Subscribe ¶
func (monadIOSelf *MonadIODef) Subscribe(s Subscription) *Subscription
Subscribe Subscribe the MonadIO by Subscription
func (*MonadIODef) SubscribeOn ¶
func (monadIOSelf *MonadIODef) SubscribeOn(h *HandlerDef) *MonadIODef
SubscribeOn Subscribe the MonadIO on the specific Handler
type NilTypeDef ¶
type NilTypeDef struct{}
NilTypeDef NilType implemented by Nil determinations
var NilType NilTypeDef
NilType NilType CompType instance
func (NilTypeDef) Matches ¶
func (typeSelf NilTypeDef) Matches(value ...interface{}) bool
Matches Check does it match nil
type OtherwisePatternDef ¶
type OtherwisePatternDef struct {
// contains filtered or unexported fields
}
OtherwisePatternDef Pattern which matching when the others didn't match(finally)
func (OtherwisePatternDef) Apply ¶
func (patternSelf OtherwisePatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (OtherwisePatternDef) Matches ¶
func (patternSelf OtherwisePatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type PMapOption ¶ added in v1.2.1
PMapOption Options for PMap usages
type Pattern ¶
type Pattern interface { Matches(value interface{}) bool Apply(interface{}) interface{} }
Pattern Pattern general interface
func InCaseOfEqual ¶
func InCaseOfEqual(value interface{}, effect fnObj) Pattern
InCaseOfEqual In case of its value is equal to the given one
func InCaseOfKind ¶
InCaseOfKind In case of its Kind matches the given one
func InCaseOfRegex ¶
InCaseOfRegex In case of the given regex rule matches its value
func InCaseOfSumType ¶
InCaseOfSumType In case of its SumType matches the given one
type PatternMatching ¶
type PatternMatching struct {
// contains filtered or unexported fields
}
PatternMatching PatternMatching contains Pattern list
func DefPattern ¶
func DefPattern(patterns ...Pattern) PatternMatching
DefPattern Define the PatternMatching by Pattern list
func (PatternMatching) MatchFor ¶
func (patternMatchingSelf PatternMatching) MatchFor(inValue interface{}) interface{}
MatchFor Check does the given value match anyone of the Pattern list of PatternMatching
type PredicateErr ¶ added in v1.2.1
PredicateErr Predicate Functor
type ProductType ¶
type ProductType struct {
// contains filtered or unexported fields
}
ProductType ProductType with a Kind list
func (ProductType) Matches ¶
func (typeSelf ProductType) Matches(value ...interface{}) bool
Matches Check does it match the ProductType
type PublisherDef ¶
type PublisherDef struct {
// contains filtered or unexported fields
}
PublisherDef Publisher inspired by Rx/NotificationCenter/PubSub
var Publisher PublisherDef
Publisher Publisher utils instance
func (*PublisherDef) Map ¶
func (publisherSelf *PublisherDef) Map(fn func(interface{}) interface{}) *PublisherDef
Map Map the Publisher in order to make a broadcasting chain
func (*PublisherDef) New ¶
func (publisherSelf *PublisherDef) New() *PublisherDef
New New a Publisher
func (*PublisherDef) Publish ¶
func (publisherSelf *PublisherDef) Publish(result interface{})
Publish Publish a value to its subscribers or next chains
func (*PublisherDef) Subscribe ¶
func (publisherSelf *PublisherDef) Subscribe(sub Subscription) *Subscription
Subscribe Subscribe the Publisher by Subscription
func (*PublisherDef) SubscribeOn ¶
func (publisherSelf *PublisherDef) SubscribeOn(h *HandlerDef) *PublisherDef
SubscribeOn Subscribe the Publisher on the specific Handler
func (*PublisherDef) Unsubscribe ¶
func (publisherSelf *PublisherDef) Unsubscribe(s *Subscription)
Unsubscribe Unsubscribe the publisher by the Subscription
type Queue ¶ added in v1.4.0
type Queue interface { Put(val interface{}) error Take() (interface{}, error) Offer(val interface{}) error Poll() (interface{}, error) }
Queue Queue inspired by Collection utils
type ReducerFunctor ¶ added in v1.2.1
type ReducerFunctor func(interface{}, interface{}) interface{}
ReducerFunctor Functor for Reduce
type RegexPatternDef ¶
type RegexPatternDef struct {
// contains filtered or unexported fields
}
RegexPatternDef Pattern which matching when the regex rule matches the given string
func (RegexPatternDef) Apply ¶
func (patternSelf RegexPatternDef) Apply(value interface{}) interface{}
Apply Evaluate the result by its given effect function
func (RegexPatternDef) Matches ¶
func (patternSelf RegexPatternDef) Matches(value interface{}) bool
Matches Match the given value by the pattern
type SetDef ¶ added in v1.2.2
type SetDef map[interface{}]interface{}
SetDef Set inspired by Collection utils
var Set SetDef
Set Set utils instance
func SetFrom ¶ added in v1.2.2
func SetFrom(list ...interface{}) *SetDef
SetFrom New Set instance from a interface{} array
func SetFromArray ¶ added in v1.2.2
func SetFromArray(list []interface{}) *SetDef
SetFromArray New Set instance from a interface{} array
func SetFromArrayInterface ¶ added in v1.2.2
func SetFromArrayInterface(list []interface{}) *SetDef
SetFromArrayInterface New Set instance from an array
func SetFromInterface ¶ added in v1.2.2
func SetFromInterface(list ...interface{}) *SetDef
SetFromInterface New Set instance from an array
func SetFromMap ¶ added in v1.2.2
func SetFromMap(theMap map[interface{}]interface{}) *SetDef
SetFromMap New Set instance from a map[interface{}]R
func (*SetDef) ContainsKey ¶ added in v1.2.3
ContainsKey Check the key exists or not in the Set
func (*SetDef) ContainsValue ¶ added in v1.2.3
ContainsValue Check the value exists or not in the Set
func (*SetDef) Get ¶ added in v1.2.3
func (setSelf *SetDef) Get(key interface{}) interface{}
Get Get items from the Set
func (*SetDef) Intersection ¶ added in v1.2.2
Intersection Get the Intersection with this Set and an another Set
func (*SetDef) IsSubsetByKey ¶ added in v1.2.3
IsSubsetByKey returns true or false by checking if set1 is a subset of set2
func (*SetDef) IsSupersetByKey ¶ added in v1.2.3
IsSupersetByKey returns true or false by checking if set1 is a superset of set2
func (*SetDef) Keys ¶ added in v1.2.3
func (setSelf *SetDef) Keys() []interface{}
Keys Convert Set to slice
func (*SetDef) MapKey ¶ added in v1.2.3
func (setSelf *SetDef) MapKey(fn TransformerFunctor) *SetDef
MapKey Map all keys of Set by function
func (*SetDef) MapValue ¶ added in v1.2.3
func (setSelf *SetDef) MapValue(fn TransformerFunctor) *SetDef
MapValue Map all values of Set by function
func (*SetDef) RemoveKeys ¶ added in v1.2.3
RemoveKeys Remove keys from the Set
func (*SetDef) RemoveValues ¶ added in v1.2.3
RemoveValues Remove values from the Set
func (*SetDef) Set ¶ added in v1.2.3
func (setSelf *SetDef) Set(key interface{}, value interface{})
Set Set items to the Set
type SimpleSortDescriptor ¶ added in v1.2.0
type SimpleSortDescriptor struct {
// contains filtered or unexported fields
}
SimpleSortDescriptor SimpleSortDescriptor implemented by TransformerFunctor
func NewSimpleSortDescriptor ¶ added in v1.2.0
func NewSimpleSortDescriptor(transformFn TransformerFunctor, ascending bool) SimpleSortDescriptor
NewSimpleSortDescriptor Generate a new SimpleSortDescriptor by TransformerFunctor & ascending(true)/descending(false)
func (SimpleSortDescriptor) IsAscending ¶ added in v1.2.0
func (descriptor SimpleSortDescriptor) IsAscending() bool
IsAscending Check is this SortDescriptor sorting by ascending
func (SimpleSortDescriptor) SetAscending ¶ added in v1.2.0
func (descriptor SimpleSortDescriptor) SetAscending(val bool)
SetAscending Set this SortDescriptor sorting by ascending(true) or descending(false)
func (SimpleSortDescriptor) TransformedBy ¶ added in v1.2.0
func (descriptor SimpleSortDescriptor) TransformedBy() TransformerFunctor
TransformedBy Get the TransformerFunctor of this SortDescriptor
type SortDescriptor ¶ added in v1.2.0
type SortDescriptor interface { Transformer IsAscending() bool SetAscending(bool) }
SortDescriptor Define a Transformer Pattern SortDescriptor
type SortDescriptorsBuilder ¶ added in v1.2.0
type SortDescriptorsBuilder []SortDescriptor
SortDescriptorsBuilder SortDescriptorsBuilder for composing SortDescriptor list and sorting data
func NewSortDescriptorsBuilder ¶ added in v1.2.0
func NewSortDescriptorsBuilder() SortDescriptorsBuilder
NewSortDescriptorsBuilder Generate a new SortDescriptorsBuilder
func (SortDescriptorsBuilder) GetSortDescriptors ¶ added in v1.2.0
func (builder SortDescriptorsBuilder) GetSortDescriptors() []SortDescriptor
GetSortDescriptors Get sortDescriptors
func (SortDescriptorsBuilder) Sort ¶ added in v1.2.0
func (builder SortDescriptorsBuilder) Sort(input []interface{})
Sort Sort by sortDescriptors
func (SortDescriptorsBuilder) ThenWith ¶ added in v1.2.0
func (builder SortDescriptorsBuilder) ThenWith(input ...SortDescriptor) SortDescriptorsBuilder
ThenWith Append a SortDescriptor
func (SortDescriptorsBuilder) ThenWithFieldName ¶ added in v1.2.0
func (builder SortDescriptorsBuilder) ThenWithFieldName(fieldName string, ascending bool) SortDescriptorsBuilder
ThenWithFieldName Use FieldName as a SortDescriptor
func (SortDescriptorsBuilder) ThenWithTransformerFunctor ¶ added in v1.2.0
func (builder SortDescriptorsBuilder) ThenWithTransformerFunctor(transformFn TransformerFunctor, ascending bool) SortDescriptorsBuilder
ThenWithTransformerFunctor Use TransformerFunctor as a SortDescriptor
func (SortDescriptorsBuilder) ToSortedList ¶ added in v1.2.0
func (builder SortDescriptorsBuilder) ToSortedList(input ...interface{}) []interface{}
ToSortedList Get the sorted result
type StreamDef ¶
type StreamDef []interface{}
StreamDef Stream inspired by Collection utils
var Stream StreamDef
Stream Stream utils instance
func (*StreamDef) FilterNotNil ¶ added in v1.2.2
FilterNotNil Filter not nil items and return a new Stream instance
func (*StreamDef) FromArrayBool ¶
FromArrayBool New Stream instance from a bool array
func (*StreamDef) FromArrayByte ¶ added in v1.2.0
FromArrayByte New Stream instance from an int8 array
func (*StreamDef) FromArrayFloat32 ¶
FromArrayFloat32 New Stream instance from a float32 array
func (*StreamDef) FromArrayFloat64 ¶
FromArrayFloat64 New Stream instance from a float64 array
func (*StreamDef) FromArrayInt ¶
FromArrayInt New Stream instance from an int array
func (*StreamDef) FromArrayInt16 ¶ added in v1.2.0
FromArrayInt16 New Stream instance from an int16 array
func (*StreamDef) FromArrayInt32 ¶
FromArrayInt32 New Stream instance from an int32 array
func (*StreamDef) FromArrayInt64 ¶
FromArrayInt64 New Stream instance from an int64 array
func (*StreamDef) FromArrayInt8 ¶ added in v1.2.0
FromArrayInt8 New Stream instance from an int8 array
func (*StreamDef) FromArrayMaybe ¶
FromArrayMaybe FromArrayMaybe New Stream instance from a Maybe array
func (*StreamDef) FromArrayString ¶
FromArrayString New Stream instance from a string array
func (*StreamDef) Intersection ¶ added in v1.2.2
Intersection Get the Intersection with this Stream and an another Stream
func (*StreamDef) IsSubset ¶ added in v1.2.2
IsSubset returns true or false by checking if stream1 is a subset of stream2
func (*StreamDef) IsSuperset ¶ added in v1.2.2
IsSuperset returns true or false by checking if stream1 is a superset of stream2
func (*StreamDef) RemoveItem ¶ added in v1.2.2
RemoveItem Remove items from the Stream
func (*StreamDef) Sort ¶
func (streamSelf *StreamDef) Sort(fn Comparator) *StreamDef
Sort Sort Stream items by Comparator
func (*StreamDef) SortByIndex ¶ added in v1.2.0
SortByIndex Sort Stream items by function(index, index) bool
type StreamSetDef ¶ added in v1.2.3
type StreamSetDef struct {
SetDef
}
StreamSetDef Set inspired by Collection utils
var StreamSet StreamSetDef
StreamSet StreamSet utils instance
func NewStreamSet ¶ added in v1.2.3
func NewStreamSet() *StreamSetDef
NewStreamSet New StreamSet instance
func StreamSetFrom ¶ added in v1.2.3
func StreamSetFrom(list ...interface{}) *StreamSetDef
StreamSetFrom New StreamSet instance from a T array
func StreamSetFromArray ¶ added in v1.2.3
func StreamSetFromArray(list []interface{}) *StreamSetDef
StreamSetFromArray New StreamSet instance from a T array
func StreamSetFromArrayInterface ¶ added in v1.2.3
func StreamSetFromArrayInterface(list []interface{}) *StreamSetDef
StreamSetFromArrayInterface New StreamSet instance from an array
func StreamSetFromInterface ¶ added in v1.2.3
func StreamSetFromInterface(list ...interface{}) *StreamSetDef
StreamSetFromInterface New StreamSet instance from an array
func StreamSetFromMap ¶ added in v1.2.3
func StreamSetFromMap(theMap map[interface{}]*StreamDef) *StreamSetDef
StreamSetFromMap New StreamSet instance from a map[T]R
func (*StreamSetDef) Clone ¶ added in v1.2.3
func (streamSetSelf *StreamSetDef) Clone() *StreamSetDef
Clone Clone this StreamSet
func (*StreamSetDef) Intersection ¶ added in v1.2.3
func (streamSetSelf *StreamSetDef) Intersection(input *StreamSetDef) *StreamSetDef
Intersection Get the Intersection with this StreamSet and an another StreamSet
func (*StreamSetDef) IsSubsetByKey ¶ added in v1.2.3
func (streamSetSelf *StreamSetDef) IsSubsetByKey(input *StreamSetDef) bool
IsSubsetByKey TODO NOTE !!Duplicated!! returns true or false by checking if set1 is a subset of set2
func (*StreamSetDef) IsSupersetByKey ¶ added in v1.2.3
func (streamSetSelf *StreamSetDef) IsSupersetByKey(input *StreamSetDef) bool
IsSupersetByKey TODO NOTE !!Duplicated!! returns true or false by checking if set1 is a superset of set2
func (*StreamSetDef) Minus ¶ added in v1.2.3
func (streamSetSelf *StreamSetDef) Minus(input *StreamSetDef) *StreamSetDef
Minus TODO NOTE !!Duplicated!! Get all of this StreamSet but not in the given StreamSet
func (*StreamSetDef) MinusStreams ¶ added in v1.2.3
func (streamSetSelf *StreamSetDef) MinusStreams(input *StreamSetDef) *StreamSetDef
MinusStreams Minus the Stream values by their keys(keys will not be changed but Stream values will)
func (*StreamSetDef) Union ¶ added in v1.2.3
func (streamSetSelf *StreamSetDef) Union(input *StreamSetDef) *StreamSetDef
Union Union an another StreamSet object
type Subscription ¶
type Subscription struct {
OnNext func(interface{})
}
Subscription the delegation/callback of MonadIO/Publisher
type SumType ¶
type SumType struct {
// contains filtered or unexported fields
}
SumType SumType contains a CompType list
type Transformer ¶ added in v1.2.0
type Transformer interface {
TransformedBy() TransformerFunctor
}
Transformer Define Transformer Pattern interface
type TransformerFunctor ¶ added in v1.2.0
type TransformerFunctor func(interface{}) interface{}
TransformerFunctor Functor of Transform