4 ms·
There are examples in Scala in the "Indexed Data" chapter of my book-in-progress: https://scalawithcats.com/dist/scala-with-cats.pdf https://scalawithcats.com/d
by noelwelsh 1y ago
There are examples in Scala in the "Indexed Data" chapter of my book-in-progress: https://scalawithcats.com/dist/scala-with-cats.pdf https://scalawithcats.com/dist/scala-with-cats.pdf
- goless 1y agoI once wrote a library typed-fsm https://github.com/sdzx-1/typed-fsm https://github.com/sdzx-1/typed-fsm It has a completely type-safe finite state machine, and it does not require additional programming conventions. It relies on a special monad: Mcbride Indexed Monad, which can model uncertainty in terms of type. Are you using this monad here? Here is a concrete ATM demo https://github.com/sdzx-1/typed-fsm/tree/main/examples/ATM https://github.com/sdzx-1/typed-fsm/tree/main/examples/ATM
- goless 1y agoIn fact, relying on this monad, we can achieve full type safety for multi-role communication. https://github.com/sdzx-1/typed-session https://github.com/sdzx-1/typed-session