Want to take part in these discussions? Sign in if you have an account, or apply for one below
Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.
started a bare minimum at state monad
added references:
and in the generality of the local state monad:
Paul-André Melliès, Local States in String Diagrams, In: G. Dowek (eds.) Rewriting and Typed Lambda Calculi RTA TLCA 2014, Lecture Notes in Computer Science 8560, Springer (2014) [doi:10.1007/978-3-319-08918-8_23]
In the Idea-section, after the first occurrence of “mutable state”, I have added the following parenthetical:
(e.g. the state of a “random access memory” device, cf. Yates (2019), p. 26 & Fig. 1.10)
pointing to:
A question:
It should be possible to consider the state monad with respect to any strong monad $\mathcal{E}$, assigning
$\mathcal{E}State \;\colon\; D \;\mapsto\; \big[ \Sigma ,\, \mathcal{E}(\Sigma) \otimes D \big]$and with $\mu^{\mathcal{E}State}$ defined using $\mathcal{E}$-Kleisli compositon.
Is this discussed anywhere?
(I have a vague memory that I have seen this mentioned, but now I can’t find it.)
Thanks, that’s useful.
(Now I just need to remember what I wanted to do with this… :-/)
Whoops, I had misread and thought the last two posts were recent…
added pointer to:
added pointer (here and elsewhere) to Moggi’s Example 1.1
added pointer to:
Stateful endofunctions are the same as Mealy machines whose input-alphabet coincides with the output-alphabet.
This is clear from inspection, and I see it is clear to programmers, such as at github.com/orakaro/MonadicMealyMachine. But I haven’t yet found a reference which would talk about this more explicitly.
added a pointer (here) to a new paragraph at Mealy machine
I have spelled out (here) how to encode “read”- and “write”-operations for the state monad, and how from these all other stateful maps are obtained with Kleisli-composition/do-notation (essentially the example indicated in Benton, Hughes & Moggi 2002 p. 68 & 71).
1 to 15 of 15