Skip to content

Releases: logic-building/functional-go

go mod issue

15 Nov 16:17
0cec7fe
Compare
Choose a tag to compare
go mod issue Pre-release
Pre-release

fix issues with higher versioning number

go mod issue

15 Nov 16:01
0cec7fe
Compare
Choose a tag to compare
go mod issue Pre-release
Pre-release

add go mod file with new version series ver1.0.0 to fix go mod issue with some internal file use with higher version.

Method chain functionality

24 Mar 22:39
ddc2c53
Compare
Choose a tag to compare

Method chain functionality for Basic type as well as struct -
Map, Filter, Sort, Distinct, Reverse, DropWhile, TakeWhile, Remove

Example:

// Use MakeIntSlicePtr for pointer version
r := fp.MakeIntSlice([]int{3, 2, 1}...).
        Filter(odd).
        Map(square).
        Sort()
fmt.Println(r) // [1 9]

func odd (num int) bool {
        return num % 2 != 0
}
func square(num int) int {
        return num * num
}

Optional Parameter for PMap to set number of Goroutines(worker)

03 Oct 21:39
63b713d
Compare
Choose a tag to compare

Eg:
PMapInt(squareInt, []int{v1, v2, v3}, Optional{FixedPool: 2, RandomOrder: true})

The default behavior of PMap:
a. number of Goroutines == length of the list.
b. Order is guaranteed

Generated Code for Struct has new functions - Distinct, Intersection, Set, Union, Difference, Superset, Subset

15 Aug 19:36
5db3da3
Compare
Choose a tag to compare

New functions for struct - (Distinct, Intersection, Union, Difference, Superset, Subset, Set) compares each member of a struct with another struct in the list.

Disabled Distinct for user defined type, it will be enabled in future

05 Aug 02:26
51ac8ce
Compare
Choose a tag to compare
Merge pull request #128 from logic-building/fix-distinct-auto-generate

Disabled distinct for user defined typefor some issue, it will be ena…

New Function - Equal<Type>sP, EqualMap<Type>, Distinct<Type>P

04 Aug 16:52
b1a7d96
Compare
Choose a tag to compare

New functions to compare slice and map.
EqualsP : eg EqualIntsP, EqualFloats64P
EqualMap: eg. EqualMapIntP , EqualMapInt64Float64P

New function to check if the slice is distinct
DistinctP: eg. DistinctIntP

Auto-generate code for struct has options to include the only list -
//go:generate gofp -destination fp.go -pkg employee -type "Employee" -only "Distinct, DistinctPtr, DistinctP"

A full list of value for option only is provided in README

New Function - Dedupe<Type>

24 Jul 14:26
b489fba
Compare
Choose a tag to compare

Added function - Dedupe
Auto-generated code for sorting for struct takes pointer types.

Auto-generated code for struct has set and sort related functions as default.

12 Jul 20:30
Compare
Choose a tag to compare

Auto-generated code for struct has set and sort related functions as default.
Options -set or -sort will override the default behavior of auto-generation of functions related to set & sort.

Added new predicate functions:
a. ZeroP
b. NegP
c. PosP
d. EvenP
e. OddP

Auto-generated code for struct has set and sort related functions as default.

11 Jul 22:53
406fc1f
Compare
Choose a tag to compare

Auto-generated code for struct has set and sort related functions as default.
Options -set or -sort will override the default behavior of auto-generation of functions related to set & sort.

Added new predicate functions:
a. ZeroP
b. NegP
c. PosP
d. EvenP
e. OddP