Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Point-free programming style

Name: Anonymous 2009-01-04 19:30

How do I write the factorial function in point-free?

fact n = foldr1 (*) [1..n]

Which is faster
add1 = 1 +
or
add1 x = 1 + x
???

Name: FrozenVoid !FrOzEn2BUo 2009-01-05 13:45

>>34
Its seems to calculate sum of excel cells. waste of variables.
bench() doesn't use arguments array because the code would
include a slower for(;;) and conditional which would made the benchmarks slower.
 It needs to pass these 10 arguments millions of times.
Speed in benchmarking is critical.
Without z1-z10 ,parsing arguments array 10 millions times would be way slower then my optimized functions, completely ruining the purpose of bench().

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List