Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

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


Today's Topics:

   1. Re:  matching the output of a standard function   to my
      function definition (non-exhaustive pattern problem) (Brent Yorgey)


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

Message: 1
Date: Mon, 27 Sep 2010 12:21:08 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] matching the output of a standard
        function        to my function definition (non-exhaustive pattern 
problem)
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Mon, Sep 27, 2010 at 06:15:22PM +0200, Martin Tomko wrote:
> Dear Daniel
> that worked perfectly, thanks for the suggestion!
> 
> One more question: how do you use null to check for empty lists?
> something like [] == null did not work ... just chekcing, I got my
> orignal code to work, thanks again!
> Martin

When in doubt, consult the types!

  null :: [a] -> Bool

That is, null is a function for testing lists to see whether they are
empty.  So rather than 'list == null' you write 'null list'.

-Brent


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

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 27, Issue 57
*****************************************

Reply via email to