<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:large">i'm not so pessimist,i'm beginning to have fun with haskell...really!</div><div class="gmail_default" style="font-size:large">about teaching ressource i will be happy to know where i can find them...</div><div class="gmail_default" style="font-size:large">i only post in haskell cafe when i have not find the answer online (tutorials,stackoverflow,<a href="http://book.realworldhaskell.org/">real haskell book </a>etc,etc... in the hunded pages i search i even get a look at <a href="https://books.google.fr/books?id=6KPSBwAAQBAJ&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false">Categories for the working Mathematician</a>) it is only when i have exhausted all the online ressource that i post to the cafe...<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 10, 2019 at 6:52 PM Tom Ellis <<a href="mailto:tom-lists-haskell-cafe-2017@jaguarpaw.co.uk">tom-lists-haskell-cafe-2017@jaguarpaw.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jan 10, 2019 at 04:23:49PM +0100, Damien Mattei wrote:<br>
> Le 10/01/2019 15:27, Tom Ellis a écrit :<br>
> > On Thu, Jan 10, 2019 at 12:34:04PM +0100, Damien Mattei wrote:<br>
> >> i have this definition:<br>
> >><br>
> >> {-# LANGUAGE FlexibleInstances #-}<br>
> >><br>
> >> class ConcatenateMaybeString a where<br>
> >> cms :: Maybe String -> a -> Maybe String<br>
> >><br>
> >><br>
> >> instance ConcatenateMaybeString (Maybe String) where<br>
> >> cms mf ms =<br>
> >> mf >>= (\f -><br>
> >> ms >>= (\s -><br>
> >> return (f ++ s)))<br>
> >><br>
> >><br>
> >><br>
> >> instance ConcatenateMaybeString String where<br>
> >> cms mf s =<br>
> >> mf >>= (\f -> return (f ++ s))<br>
> > <br>
> > Trying to simulate overloading like this is ultimately going to lead to more<br>
> > frustration than benefit. I strongly suggest you just define two different<br>
> > functions.<br>
> <br>
> those functions could be seen as a "style exercise" , for me,coming from<br>
> untyped languages such as Scheme or LisP it's Haskell which is a<br>
> frustration :-)<br>
<br>
I think you're going to get significantly more frustrated with Haskell if<br>
you try to learn it like this by yourself rather than by working through<br>
some widely approved teaching resource. Of course, how you spend your time<br>
is up to you, but if you're frustrated with Haskell then trying to make it<br>
up as you go along is only going to worsen the feeling!<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>