buildFunc{
func("ho"){
// this should be broader than CodeBlockBuilder
}
}
Therefor, make an interface with all the interfaces of CodeBlockBuilder.
let CodeBlockBuilder implement that interface.
Make a class FunctionBlockBuilder and let it delegate the interface to a CodeBlockBuilder stored inside.
Therefor, make an interface with all the interfaces of CodeBlockBuilder. let CodeBlockBuilder implement that interface. Make a class FunctionBlockBuilder and let it delegate the interface to a CodeBlockBuilder stored inside.