Documentation ¶
Overview ¶
Package convert provides loop converation helpers
Index ¶
- func AndConvert[From, I, To any](next func() (From, bool), firsConverter func(From) I, ...) loop.Loop[To]
- func AndFilter[From, To any](next func() (From, bool), converter func(From) To, filter func(To) bool) loop.Loop[To]
- func AndReduce[From, To any](next func() (From, bool), converter func(From) To, merge func(To, To) To) (out To)
- func Check[From, To any](next func() (From, bool), converter func(from From) (To, bool)) loop.Loop[To]
- func FromIndexed[From, To any](len int, next func(int) From, converter func(from From) To) loop.Loop[To]
- func NilSafe[From, To any](next func() (*From, bool), converter func(*From) *To) loop.Loop[*To]
- func NotNil[From, To any](next func() (*From, bool), converter func(*From) To) loop.Loop[To]
- func ToNotNil[From, To any](next func() (From, bool), converter func(From) *To) loop.Loop[*To]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AndConvert ¶
func AndConvert[From, I, To any](next func() (From, bool), firsConverter func(From) I, secondConverter func(I) To) loop.Loop[To]
AndConvert - convert.AndConvert makes double converts From->Intermediate->To of the elements
func AndFilter ¶
func AndFilter[From, To any](next func() (From, bool), converter func(From) To, filter func(To) bool) loop.Loop[To]
AndFilter - convert.AndFilter converts only filtered elements and returns them
func AndReduce ¶ added in v0.0.8
func AndReduce[From, To any](next func() (From, bool), converter func(From) To, merge func(To, To) To) (out To)
AndReduce - convert.AndReduce converts elements and merge them into one
func Check ¶
func Check[From, To any](next func() (From, bool), converter func(from From) (To, bool)) loop.Loop[To]
Check - convert.Check is a short alias of loop.ConvertOK
func FromIndexed ¶ added in v0.0.8
func FromIndexed[From, To any](len int, next func(int) From, converter func(from From) To) loop.Loop[To]
FromIndexed - convert.FromIndexed retrieves elements from a indexed source and converts them
func NilSafe ¶
NilSafe - convert.NilSafe filters not nil next, converts that ones, filters not nils after converting and returns them
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.