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. It is now read-only.
And this leads us to the problem. I want to log the state before and after toState call. Of cause I can write it directly, but what is FP for? :-) I want to do is as middleware and compose it. Maybe it's better to use Kleisli with OptionT here? It composes well.
The Second problem again with PartialFunction and toState. The signature of the function is PartialFunction[Router.Path, S => F[S]]. And if I want to make a decision about handling the path based on the old state, I just can't do it in the pattern matching. All I can do is to return the old state.