Alexis Lee alexis@turton.com writes:
Yes, but just what can you _do_ with a function except rewrite it or call it? Function division and subtraction?!?
If you like. Personally, I tend to use them in catch statements and other such things. Thunks are often handy, too.
All the rewriting you might want to do deals with a function as a piece of text, and thus is better dealt with using existing string functions plus eval(). Not quite as syntactically pretty, but it does mean you're not duplicating the string library.
Functions aren't strings! Think about manipulating their parse structure trees in a similar way to XSLT manipulating XML trees. No, I don't do that quite so much with variables, but macros are powerful tools.
Yes, but the power comes if you don't do bad cohesion like that and you compose functions. I very rarely use begin... The time when I do is when I'm trying to interface with something procedural, such as a database.
hum, I understood you were meant to start your program with a begin. I guess that's just a useful thing to do.
No, I hardly ever use it. You only start your program with begin if you're making the popular mistake of writing procedural code, I think. My recent programs (in guile) consist of a use-modules line, then a single structure.