[Tutor] Newbie question. [primitive operations / scheme tangent]
Danny Yoo
dyoo@hkn.eecs.berkeley.edu
Sun, 26 May 2002 23:16:50 -0700 (PDT)
> [Random, offtopic note: this situation is different from the Scheme
> programming language, where even '+ and '- can be used standalone. For
> example, it's possible to say something like this in Scheme:
>
> ;;;
> dyoo@coffeetable:~$ guile
> guile> +
> #<primitive-procedure +>
> guile> (define (apply-with-42-and-24 function)
> (function 42 24))
> guile> (apply-with-42-and-24 +)
> 66
> guile> (apply-with-42-and-24 -)
> 18
> guile> (apply-with-42-24 /)
> 1.75
> ;;;
>
> Sorry, I just had to go off-tangent for a moment. *grin*]
And I also cut-and-pasted wrong... again. *sigh* That last example:
;;;
guile> (apply-with-42-24 /)
1.75
;;;
should have been:
;;;
guile> (apply-with-42-and-24 /)
1.75
;;;
Sorry about the confusion!