is it possible to create function pipelines in go language, where output of one function is directly conventionality into input of another function.
Please discuss it in the comments if it's not clear and you need more info.
Other functional languages provide some constructs, for instance it's then in javascript with promises, in java they use andThen with lambdas, and with c# it's FunctionExtensions. Shell programs like unix also provides buitin method called pipes |
func processA(test TestObj) {
// do something
return test
}
func process B(test TestObj) {
//do something
return test
}
func processC(test TestObj) {
//do something
return test
}
so can we do something similar like
var obj = TestObj{}
processA(obj)
.then(processB)
.then(processC)
jim, the second example uses the channels? can you please provide a code example using my code.