Simplify stream algebra via macros