we can have some helper api for cases like this:
WithActivationFunc(func(this *component.Component) error {
brainErr := handleBrainSignals(this)
if brainErr != nil {
return brainErr
}
heartErr := handleHeartSignals(this)
if heartErr != nil {
return heartErr
}
return nil
})
Something like: WithActivationFunc(component.CompositeActivationFunction(doThis, thenThis, andThis))
Also we can think about different error handling strategies within the composition: fail on first or do all and return resulting error
we can have some helper api for cases like this:
Something like: WithActivationFunc(component.CompositeActivationFunction(doThis, thenThis, andThis))
Also we can think about different error handling strategies within the composition: fail on first or do all and return resulting error