[Haskell-beginners] Conciseness question

Manfred Lotz manfred.lotz at arcor.de
Sun Aug 7 19:09:36 CEST 2011


On Sun, 7 Aug 2011 12:52:59 -0400
David Place <d at vidplace.com> wrote:

> On Aug 7, 2011, at 12:36 PM, Manfred Lotz wrote:
> 
> > because then I have to write names d1, ..., d15 two times in order
> > to get my definitions right. I'm looking for a more elegant way
> > doing this.
> > 
> > 
> > Hope this is a bit clearer what I'm after.
> 
> Yes, thank you, that is quite clear.   I think that is the best you
> can do in Haskell.  I really don't see it as inelegant at all.  You
> define the variables d1 through d15 and then dirList is a function of
> those definitions.   You type d1 once for its definition and next for
> its use.  You would like to combine the two activities?  Something
> like this perhaps? 
> dirLst  = [d1 = "somedir",  d15 = "otherdir"]
> 

If this were possible that would be fine. When trying to compile this
however I get: parse error on input `='



-- 
Manfred





More information about the Beginners mailing list