[1/5] from: tim::johnsons-web::com at: 22-Mar-2004 9:51
This is strange: (to me anyway)
>> help function?
USAGE: FUNCTION? value DESCRIPTION: Returns TRUE for function values. FUNCTION? is an action value. ARGUMENTS: value -- (Type: any-type) ;; OKAY .... let's find a function
>> help forall
USAGE: FORALL 'word body DESCRIPTION: Evaluates a block for every value in a series. FORALL is a function value. ARGUMENTS: word -- Word set to each position in series and changed as a result (Type: word) body -- Block to evaluate each time (Type: block) (SPECIAL ATTRIBUTES) throw ;; test forall
>> function? 'forall
== false ;; Say What!? I'm missing something here. ;; what did I do wrong? thanks tim -- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com
[2/5] from: g:santilli:tiscalinet:it at: 22-Mar-2004 20:04
Hi Tim, On Monday, March 22, 2004, 7:51:08 PM, you wrote:
>>> function? 'forall
TJ> == false
>> function? :forall
>> type? 'forall
>> function? get 'forall
== true Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/
[3/5] from: maximo:meteorstudios at: 22-Mar-2004 14:04
function? :forall you must supply a function VALUE for function to return true. if you don't prepend the function name by a colon, then the function is -obviously- evaluated. function? get in system/words 'forall is another way to do it... it even lets you find functions in objects. -MAx --- You can either be part of the problem or part of the solution, but in the end, being part of the problem is much more fun.
[4/5] from: maximo:meteorstudios at: 22-Mar-2004 14:11
I'll add that a word of the form :word is a get-word! datatype. and using your (and my) example, the following form also works if you are in the global namespace (like when you're in the console) function? get 'forall get returns value of the word instead of evaluating it. -MAx
[5/5] from: tim:johnsons-web at: 22-Mar-2004 10:46
* Maxim Olivier-Adlhoch <[maximo--meteorstudios--com]> [040322 10:41]:
> I'll add that > > a word of the form :word is a get-word! datatype. > and using your (and my) example, the following form also works if you > are in the global namespace (like when you're in the console)
Thanks to Max and Gabrielle. All really good info> regards tim
> function? get 'forall > get returns value of the word instead of evaluating it.
<<quoted lines omitted: 55>>> To unsubscribe from this list, just send an email to > [rebol-request--rebol--com] with unsubscribe as the subject.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted