typeswitchtypeswitch@gamedev.lgbt
Oct 16, 2026, 5:33 AMnotice the free monad describes an imperative language, but when we use a monad, what we're actually working with is a generic type that represents programs in that language.
e.g. suppose the monad is called Foo, then Foo(Int) and Foo(String) and Foo(Float) are all types that represent programs in the Foo language. (*your notation for generic types may vary.)
in particular, Foo(T) is the type of programs in the Foo language where the final "return" statement has a value of type T.