Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Problems with lifting code (Imants Cekusins)


----------------------------------------------------------------------

Message: 1
Date: Sun, 2 Oct 2016 18:20:48 +0200
From: Imants Cekusins <ima...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] Problems with lifting code
Message-ID:
        <CAP1qinYhnpqCc9MBEb59nt5e=l_j_nbwza4sv2z80wn5w5f...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

> I am not sure  why the constructor is used on the LHS of (2)

lift1 :: (a -> a) -> b a -> b a
lift1 o (MyNum x) = MyNum (o x)

2nd arg to lift1 is b a

o expects a

by adding ctor (MyNum a), we get to a

lift1 o (b a) = ...

without ctor MyNum, x is b a, not a
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20161002/e0e3168b/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 100, Issue 4
*****************************************

Reply via email to