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.  general observation about programming (Dennis Raddle)
   2. Re:  The (x:xs) in function parameter is a tuple? (Josh Barney)


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

Message: 1
Date: Wed, 24 Feb 2016 16:03:10 -0800
From: Dennis Raddle <dennis.rad...@gmail.com>
To: Haskell Beginners <beginners@haskell.org>
Subject: [Haskell-beginners] general observation about programming
Message-ID:
        <cakxlvooekk+_qrkcawgnwurvnkkpeycfjwcxaxdddfitvqw...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

This is more about programming in general than Haskell, although Haskellers
probably know it well.

I don't claim to have expert knowledge on this, but I'm gradually getting
better at it.

When I set out to write a program, or refactor a program, or modify a
program, it helps to set out my thinking in a clear way. And how I make it
clear is to document my thoughts.

An outline is one good way to organize thoughts and is probably my main
tool. But good English prose is also helpful.

The key factor is "editing." In what sense do I mean that? Good writers do
it, and the Haskell documentation does it. I mean (1) brevity and (2) good
flow. To achieve brevity, you must think about the essence of each
statement and trim away the unnecessary stuff. Good flow refers to how the
document builds up and modifies your concepts as you read it. A document
can actually mirror an effective learning process, or influence and change
your process.

I work with my documentation, making several editing passes. By the time
I'm done, I am in a great position to write a concise and flexible program.

It's interesting that not only is Haskell a concise language, but the
Haskell library documentation is concise. Contrast that with the Python
documentation which often wanders about into areas that are irrelevant--it
could easily be cut into one third its present size.

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160224/338b413a/attachment-0001.html>

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

Message: 2
Date: Wed, 24 Feb 2016 23:35:02 -0500
From: Josh Barney <bayesra...@gmail.com>
To: The Haskell-Beginners Mailing List - Discussion of primarily
        beginner-level topics related to Haskell <beginners@haskell.org>
Subject: Re: [Haskell-beginners] The (x:xs) in function parameter is a
        tuple?
Message-ID: <b8b93c02-f196-44a0-98e5-6601171a8...@gmail.com>
Content-Type: text/plain; charset="us-ascii"

The way I learned it:
A tuple type is defined by the types inside it, so an (int,int) is not the same 
type as an (int, maybe(int)). With a one-tuple the type would just be (int) and 
that provides zero benefit. 
Instead of trying to do `first (...my expression...)` to get the first element 
of the one tuple, it just becomes the value inside.

Sent from my iPhone

> On Feb 24, 2016, at 7:02 PM, Imants Cekusins <ima...@gmail.com> wrote:
> 
> My guess is: tuple must contain 2+ elements.
> 
> Try to enter (1) in ghci. It is displayed as 1
> 
> Parentheses are only recognized as a tuple if there are elements separated by 
> a comma. Otherwise an expression is assumed.
> 
> _______________________________________________
> Beginners mailing list
> Beginners@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20160224/b52f7547/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 92, Issue 31
*****************************************

Reply via email to