> (makes me wish we were using Rust: > CombStage would just be: > impl<I: SignalGroup, O: SignalGroup, F: Fn(I, &mut Module) -> O> Stage<I, > O> for F {...} it's probably doable, using iterators and reduce, or something equally obscure. overriding __add__ or something as a way to connect two stage instances [basically __add__ is calling connect_to_next, then reduce on... you get the idea] actually... *click*... the input "type" and the return "type" of the function: that's it. it should be possible to do introspection on them. i was trying to work out how the hell you could encode the input and output data types into a function. without the input and output data types, the function itself has to declare them (somehow) and it gets complex enough to make it not worthwhile, you might as well use a class. > that way you could just use any function with the right prototype as a > Stage without needing to make a CombStage or anything.)