mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-07 06:02:27 +08:00
refactor: update Compose func in function.go
This commit is contained in:
@@ -48,8 +48,8 @@ func (f Fn) Curry(i interface{}) func(...interface{}) interface{} {
|
||||
}
|
||||
|
||||
// Compose compose the functions from right to left
|
||||
func Compose(fnList ...func(...string) string) func(...string) string {
|
||||
return func(s... string) string {
|
||||
func Compose(fnList ...func(...interface{}) interface{}) func(...interface{}) interface{} {
|
||||
return func(s... interface{}) interface{} {
|
||||
f := fnList[0]
|
||||
restFn := fnList[1:]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user