[Haskell-cafe] One question...

Dan Mead d.w.mead at gmail.com
Sat Dec 9 12:13:39 EST 2006

To think "properly" in haskell when you need side effects you should look at
and how they are used in I/O.

I'm no expert but most applications i've seen start like this

main = do x <-getArgs
               mapM_ somefunction(x)

do is a construct that lets you have a bunch of IO statements in succession
which in turn
starts to look like imperative programming. So this is how you can access
the rest of the world
from Haskell.

(someone please correct me if i'm wrong)


On 12/9/06, Waldemar Biernacki <wb at sao.pl> wrote:
> Hello to everyone!
> Two days ago I have found Haskell in Internet. It sounds very nice.
> I have read some articles, few examples, ... yes it sounds nice.
> Now my problem is connected with the "non-update" object feature.
> I can't write "variable" instead object because - from the meaning of the
> word
> ( variable ) - it has the possibility to CHANGE its value.
> Yes that my problem :-(
> Let's assume that I've got to write the application that
> should works as follows:
> 1. At the beginning the user should write her/his name (for instance as
> the
> application parameter).
> 2. Let's assume that the application has many various functions defined
> inside, and - after printing each of the outputs - the name has to be
> printout.
> How should I think "properly" in Haskell to get described action?
> cheers
> Waldemar
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20061209/c8c542fd/attachment.htm

More information about the Haskell-Cafe mailing list