Add Stateful Stages


Currently stages are functions without any state. For some flows that´s not enough. For example think of a flow reformatting a text into lines with a max length. There´s no easy way to feed a variable line length into the reformatting stage. But with stateful stages, where a stage is not a function but an object, that would be possible, e.g.
Flow<string>.Do<string>(SplitTextIntoWords).Do<string>(new CompileWordsIntoLines(80))
The CompileWordsIntoLines class could implement some IStage interface or otherwise publish a stage funcation and at the same time keep state. It would gather words until another line is filled up and then output the line.
Closed Jul 6, 2009 at 11:56 AM by ralfw
Implemented stateful stages with ISeqHandler.