On Wed, Nov 14, 2012 at 5:37 PM, Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br>> On Wed, 14 Nov 2012, Tyson Whitehead wrote:<br>>> That is, is it also sensibly a non-Pointed Monad?<br>
><br>> TMap implements Applicative and Monad instances corresponding to the Reader monad. That is, join m ! k == m!k!k. This would not work with a plain Data.Map, since (m!k!k) may not exist.<div><br></div><div>If (m ! k) exists but (m ! k ! k) does not, that just means (join m ! k) does not exist.</div>
<div><br></div><div> join = Map.mapMaybeWithKey Map.lookup</div><div><br></div><div>This is the semantics we would get with ReaderT k Maybe and, if it existed, TMapT k Maybe.</div><div><br></div><div>- Jake</div>