[Haskell-cafe] foreach

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Sep 13 07:21:14 EDT 2006

Hello Henning,

Wednesday, September 13, 2006, 1:12:35 PM, you wrote:

> Adding sugar or using Template Haskell for such a simple task is a bit
> unreasonable. I think Tim should use mapM a little bit and then he will
> probably need no longer a special syntax.

i disagree. lack of good syntax makes imperative programming in
Haskell less convenient. i want to have such syntax in order to make
Haskell great imperative language:

sum <- new 0
arr <- new Array[1..3]
for i in [1..3] do
  sum += i
  arr[i] := sum
for i in [1..3] while arr[i]<2 do
  print arr[i]

it will be even better to have ability to define such syntax
constructs in user program

Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com

More information about the Haskell-Cafe mailing list