Open ggreif opened 7 years ago
I like idea if it can be extended to generic approach that enables support for wide range of use-cases. I am not sure what function did you aim for, but for pmoore
there is also alternative approach that can be useful.
pmoore = r 1 read . r "42" show . r 0 (*2)
where
r a f = register a . fmap f
I have just written a toy 3-stage pipeline for a
moore
machine:I wonder whether such a thing would be useful for folks. If not, please close. Otherwise I could come up with a pull request. Of course many variants (types of feedback/
mealy
etc.) would be possible, so some guidance is welcome.