2018. november 12., hétfő 9:08:28 UTC+1 időpontban Iván Corrales Solera a következőt írta: > > Hey Tamás, > > First of all, thank you for your feedback. Well, actually as I commented > on the tile "takes the hassle out of working with arrays", so yes so far > only slices are supported, > > In regarding to the lazy or versatile, I don't get you I mean in the > example below: > > > package main > > import ( > "github.com/wesovilabs/koazee" > "github.com/wesovilabs/koazee/logger" > ) > > var numbers = []int{1, 2, 3, 4, 4, 1} > > func main() { > logger.Enabled = true > var stream = koazee.Stream(). > Filter(func(val int) bool { > return val%2 == 0 > }). > Map(func(val int) int { > return val * 2 > }). > RemoveDuplicates() > > stream.With(numbers). > Reduce(func(acc, val int) int { > return acc + val > }) > } > > > nothing is evaluated until you call Reduce function, and in case of some > of the previous evaluation fail reduce won't be performed. > > stream.With stores the slice and calls the "run" method. "run" calls "items", which copies the _whole_ slice (shallow), with reflection (slow), then returns the fresh copied slice in a Stream.
This is nowhere not Lazy. In regard to the versatility, Koazee provide a "generic" support for any > type of slices, as you can see in the examples or in the documentation no > casting are required for handling your arrays. > > I hope this can resolve your doubts, and hanks again for your feedback,, > really appreciate it > > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.