refactor: update Compose func in function.go

This commit is contained in:
dudaodong committed 2021-12-14 10:29:53 +08:00
1 parent d1b74cfcfb
commit 60f3a72c88
2 files changed
+6 -8

No files matched your search

+2 -2
View File
@@ -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:]