<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 20 Nov 2015, at 11:31, Erik Hesselink <<a href="mailto:hesselink@gmail.com" class="">hesselink@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">On 20 November 2015 at 02:30, Manuel Gómez <<a href="mailto:targen@gmail.com" class="">targen@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class="">I haven’t found a helpful example of an Applicative that is not a Monad<br class="">that is practical for a lesson.<br class=""></blockquote><br class="">There's ZipList [0], which depending on the type of audience might be<br class="">doable. There's also Const [1], but that needs a Monoid constraint,<br class="">and since you said you considered ((,) e) as not having an<br class="">Applicative, which it does have with a Monoid constraint, perhaps<br class="">Const isn't suitable to you for that reason. There are more<br class="">interesting examples here [2].<br class=""><br class=""></div></blockquote><blockquote type="cite" class=""><div class="">Erik<br class=""><br class="">[0] <a href="https://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Applicative.html#t:ZipList" class="">https://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Applicative.html#t:ZipList</a><br class="">[1] <a href="http://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Applicative.html#v:Const" class="">http://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Applicative.html#v:Const</a><br class="">[2] <a href="http://stackoverflow.com/questions/7220436/good-examples-of-not-a-functor-functor-applicative-monad" class="">http://stackoverflow.com/questions/7220436/good-examples-of-not-a-functor-functor-applicative-monad</a><br class="">_______________________________________________<br class="">Haskell-Cafe mailing list<br class=""><a href="mailto:Haskell-Cafe@haskell.org" class="">Haskell-Cafe@haskell.org</a><br class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe<br class=""></div></blockquote></div><br class=""><div class=""><div>There are also (which I find actually useful):</div><div><br class=""></div><div>- `Concurrently = Concurrently (IO a)` which is Monad only IO effects are commutative. [3]</div><div> - one can argue that Applicative and Monad instances aren’t compatible</div></div><div>- `Errors` [4], which could be specialised to `Either (NonEmpty err) a` and `ap` would gather all errors!</div><div> - and of course `Lift` using which `Errors` is defined.</div><div><br class=""></div><div>[3] <a href="https://hackage.haskell.org/package/async-2.0.2/docs/Control-Concurrent-Async.html#t:Concurrently" class="">https://hackage.haskell.org/package/async-2.0.2/docs/Control-Concurrent-Async.html#t:Concurrently</a></div><div>[4] <a href="https://hackage.haskell.org/package/transformers-0.4.3.0/docs/Control-Applicative-Lift.html#t:Errors" class="">https://hackage.haskell.org/package/transformers-0.4.3.0/docs/Control-Applicative-Lift.html#t:Errors</a></div><div><br class=""></div><div>- Oleg</div></body></html>