[REBOL] Re: Using a Math oper. buried in a variable
From: mumpsoid::gmx::com at: 2-Apr-2009 18:24
On Thu, 2 Apr 2009, Henrik Mikael Kristensen wrote:
> >>> op: :*
> >>> op num1 num2
> > == 30
> >>>
> >
> > Cool!
> >
> > but I would have never fingered that out in a million years. :)
>
> Alright, a little theory:
>
> :* is a get-word! and when you get-word something, you get its
> content. In this case, you are getting a function body, but not
> evaluating it. This way, you can set words to a particular function
> body, so above, 'op is set to that function body.
>
> It's similar to saying:
>
> get '*
>
> Whereas evaluating it, would be equivalent to:
>
> do '*
>
> Try something like:
>
> probe :for
>
> and out pours the sourcecode for the FOR function.
Thanks for the extra theory. I'm slowly morphing into a REBOLer.
--
Duke Normandin
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?