[Haskell-cafe] Hints for Euler Problem 11

Lennart Augustsson lennart at augustsson.net
Thu Aug 16 16:18:15 EDT 2007


But if the strings are all constant it's perfectly feasible to concatenate
them at compile time.

On 8/16/07, Kim-Ee Yeoh <a.biurvOir4 at asuhan.com> wrote:
>
>
>
> Aaron Denney wrote:
> >
> > On 2007-08-15, Pekka Karjalainen <p3k at iki.fi> wrote:
> >> A little style issue here on the side, if I may. You don't need to use
> >> (++) to join multiline string literals.
> >>
> >> text = "If you want to have multiline string literals \
> >>        \in your source code, you can break them up with \
> >>        \backslashes. Any whitespace characters between \
> >>        \two backslashes will be ignored."
> >
> > I find the first far more readable.  The compiler should be able to
> > assemble it all at compile time, right?
> >
>
> 'Course not. The (++) function like all Haskell functions is only a
> /promise/ to do its job. What does "assembling at compile time"
> mean here:
>
> s = "I will not write infinite loops " ++ s
>
> --
> View this message in context:
> http://www.nabble.com/Hints-for-Euler-Problem-11-tf4114963.html#a12188224
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>
> _______________________________________________
> 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/20070816/7cd90d9c/attachment.htm


More information about the Haskell-Cafe mailing list