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:  A first try (David Place)
   2.  Understanding some notation (Jack Henahan)


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

Message: 1
Date: Sun, 26 Jun 2011 17:32:02 -0400
From: David Place <[email protected]>
Subject: Re: [Haskell-beginners] A first try
To: Manfred Lotz <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii



On Jun 26, 2011, at 4:59 PM, Manfred Lotz wrote:

> Is there any problem in the code snippet I pasted? If so I would
> like to get a hint of course.

There really isn't enough code in your snippet to be able to say.  The rule is 
that if you return a lazy data structure from withFile you may find the file 
has been closed before you have read the data.  If your parseXMLDoc is strict 
then you will get away with it.   I feel that isn't very nice.

____________________
David Place   
Owner, Panpipes Ho! LLC
http://panpipesho.com
[email protected]




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

Message: 2
Date: Sun, 26 Jun 2011 18:14:44 -0400
From: Jack Henahan <[email protected]>
Subject: [Haskell-beginners] Understanding some notation
To: Haskell Beginners <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

I have this code snippet:

    import Data.List

    aaa x (y:ys) = case splitAt x (y:ys) of
      (n, x:xs) -> x:n ++ xs
      (n, xs) -> n ++ xs

I understand what it's meant to do (that is, split a list at index `x` and make 
a new list with that element at the head, or just return the list when given a 
singleton), but my brain is failing me when trying to read the notation `n ++ 
xs`.

Is there some obvious explanation that I'm just forgetting?


====
"Computer Science is no more about computers than astronomy is about 
telescopes."
-- Edsger Dijkstra
====

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 398E692F.asc
Type: application/x-apple-msg-attachment
Size: 24295 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110626/38e4099b/attachment.bin>
-------------- next part --------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 881 bytes
Desc: This is a digitally signed message part
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110626/38e4099b/attachment.pgp>

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

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


End of Beginners Digest, Vol 36, Issue 66
*****************************************

Reply via email to