You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.
I have just written a toy 3-stage pipeline for a moore machine:
pip3 :: (a -> b) -> (b -> c) -> (c -> d) -> (b, c, d) -> a -> (b, c, d)
pip3 f g h (b, c, _) a = (f a, g b, h c)
pmoore = moore (pip3 (*2) show read) project3 (0, "42", 1)
where project3 (b, c, d) = d
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.
The text was updated successfully, but these errors were encountered:
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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.The text was updated successfully, but these errors were encountered: