[Haskell-cafe] How to write fast for loops

Niklas Hambüchen mail at nh2.me
Mon Apr 28 02:25:25 UTC 2014


Hey Conrad!

That sounds like a nice idea. I might have a look at it after I have
actually figured out what the fastest/best way is (see the benchmarks I
just posted).

Niklas

On 28/04/14 01:00, Conrad Parker wrote:
> Niklas,
> 
> just for fun, and seeing as your goal is to make something that works
> elegeantly and efficiently with list syntax, how about making a new type
> that's an instance of OverloadedLists but never actually allocates
> anything, so you can basically desugar "X.forM_ [a..b]" to your loop
> function?
> 
> Conrad.


More information about the Haskell-Cafe mailing list