On Jan 13, 2008 9:04 PM,  <[EMAIL PROTECTED]> wrote:
> ** First of all, whenever you define a new function, the function's name and
>    function's code are stored in the "global environment".  I thought
>    functional programming meant you weren't allowed to have any state.  Yet,
>    modifying a "global environment" means changing state!?!?!?

I'll leave this bit to someone more experience than I... the specifics
of "state" currently elude me as I haven't formally studied
programming (at least not yet).

> ** Does the evaluation of functions return some mysterious type of object?
>    What the heck is going on?  For example, look at evaluation of "+"...
>
> 1 ]=> +
>
> ;Value 11: #[arity-dispatched-procedure 11]

The procedure for the built-in "+" name is internally compiled, as it
is one of the primitive procedures you can use to combine into other,
more complex procedures

> ** Also, what is the type of "define"?  You cannot evaluate "define" so it
>    can't be a regular function.
>
> 1 ]=> define
>
> ;Syntactic keyword may not be used as an expression: ()
> ;To continue, call RESTART with an option number:
> ; (RESTART 1) => Return to read-eval-print level 1.

"define" is specifically defined as having a "special type."

For more info, look at the first set of lecture notes on the MIT
OpenCourseWare page.

-- 
Brad Beyenhof
http://augmentedfourth.com
Silence will save me from being wrong (and foolish), but it will also
deprive me of the possibility of being right.
                                                    ~ Igor Stravinsky

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to