github.com/m4gshm/gollections@v0.0.10/op/delay/chain/api.go (about) 1 package chain 2 3 // Of returns a function that calls the specified functions in sequence with the argument returned by the previous one 4 func Of[T any](funcs ...func(T) T) func(T) T { 5 return func(t T) T { 6 for _, f := range funcs { 7 t = f(t) 8 } 9 return t 10 } 11 }