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: Anonymous 2009-01-05 14:18

>>38
You'll have to be more specific with your questions, I don't understand what you mean by ``size of code".
As for memory management, if you're writting an OS, or something similar ( like a debugger which doesn't depend on the OS ), you'll have to do the memory management yourself by modifying the needed descriptors and tables, details for this can be found in the fine manuals, otherwise, you should just call whatever APIs or library functions are provided to you by the OS to do the allocation of freeing of memory. Can't answer the third question since you gave no details, but I'm sure reading the fine manuals will give you the answer.

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