Releases: koss-null/FuncFrog
Any() feature added
Any
is a function that returns some element prom the pipe if any exist or a nil value.
It is implemented is some another way than the rest functions: it works im parallel both with Gen
and Take
and moreover it does not need any of them to be successfully executed. Be aware if the pipe is empty and no Gen or Take is set: it may take a long time to execute.
MergeSort Fix
This is a release with no new features supplied.
Sort(func(T, T) bool)
function have been refactored and fixed. For now it looks like the MergeSort is not is not good enough since it requires n^2 memory, so it overheats GC and consumes a lot of memory on big arrays.
I gonna change the sort algorithm in further releases.- Some more tests have been added
Sum(), First() and tests added
In this release I've almost covered all issues that where mentioned about the project condition.
Code changes:
Sum(func(x, y T) T)
function was added. It's pretty similar to theReduce(...)
one but doesn't care about operation order, though it works in parallelFirst()
function was added. It returns the first element found. May be really useful if there is a lot of data filtered out- Minor bugfixes, insignificant performance improvements, refactor
Other - README.md now is not so desiccated anymore, add some specs, a lot of examples and explanations
- add some tests, mostly to the new functionality, but a start was made
- the project is under a standard MIT license now (at leas it is what I was intended to do changing the license)
- some basic roadmap is described in the Readme file
Tested and parallel Sort() [ready-to-use]
Pretty stable, ready-to-use release.
Parallel Sort(less func(T, T) bool)
function added.
This release is refactored and well-tested manually.
The only feature not provided is parallelism when Take(n)
is used.
0.2.0-single-thread
Rough release. All functions should work well.
This code ignores Parallel() option and executes all in a single thread, and it works much faster than a parallel version.
Changes:
- Get(n int) renamed to Take(n int) with the same functionality
- Parallel(n int) makes no effect, all executes in a single thread
First working implementation
Slice source from: Slice()
, Func()
Supports:
Map()
, Filter()
, Reduce()
operations
Parallel()
option works to set the number of simultaneous workers.
The length of the pipe setted with Func()
is set by Get(n)
or Gen(n)
functions.
Get the result with Do()
or Count()
This is the first approach to implement the pipe
It's fast enough and have some good ideas, so it may be continued for development in case of the main branch performance issues.