<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=""><i class="">"But how do you take an arbitrary type and turn it into a monoid?”</i><div class=""><i class=""><br class=""></i></div><div class="">I didn’t - I must have been dreaming about Haskell at that point :) (My wife once dreamt she was a C compiler - go figure… C !!??) </div><div class="">No, just Monad, Applicative and Functor - my mistake.</div><div class=""><br class=""></div><div class="">Thanks </div><div class=""><br class=""></div><div class="">Mike</div><div class=""><br class=""><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 19 Nov 2015, at 06:34, Kim-Ee Yeoh <<a href="mailto:ky3@atamo.com" class="">ky3@atamo.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_extra">On Thu, Nov 19, 2015 at 1:33 AM, Mike Houghton <span dir="ltr" class=""><<a href="mailto:mike_k_houghton@yahoo.co.uk" target="_blank" class="">mike_k_houghton@yahoo.co.uk</a>></span> wrote:<br class=""><br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">The source is just me exploring. </div></blockquote><div class=""><br class=""></div><div class="">Nice.<br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">I first looked at </div><div class=""><br class=""></div><div class="">data C a = C a deriving (Show)</div><div class=""><br class=""></div><div class="">and made Monad, Applicative, Monoid and Functors for it.</div></blockquote><div class=""><br class=""></div><div class="">Even though the null-effect instances for the identity functor are trivial, there's value in writing them out, especially for the motivated.<br class=""><br class=""></div><div class="">But how do you take an arbitrary type and turn it into a monoid?<br class=""></div><br clear="all" class=""><div class=""><div class="gmail_signature">-- Kim-Ee</div></div>
</div></div></div>
_______________________________________________<br class="">Beginners mailing list<br class=""><a href="mailto:Beginners@haskell.org" class="">Beginners@haskell.org</a><br class="">http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners<br class=""></div></blockquote></div><br class=""></div></div></body></html>