golem
golem copied to clipboard
Auto constructor for structs
As a Engineer I want to automate simple constructors so that allocation of new type is an "arrow function: (A, B, C) => T" eliminates the boilerplate
type T struct {
a A
b B
c C
}
var NewT = hseq.Arrow3[T, A, B, C]
As hypothesis we eliminate boilerplate:
func NewT(a A, b B, c C) *T {
return &T{a:a, b:b, c:c)
}