Hi,
This is not a proposal, just a sketch. I think this could be convenient for
DI frameworks for example.
func resolve<Params, Result>(factory: Params -> Result) -> () -> Result {
return {
let pParams: Params =
#signature(factory).params.build(createParameter)
return factory(pParams)
}
}
func createParameter<Parameter>() -> Parameter {
fatalError("Somehow")
}
Any thoughts?