tags:

views:

51

answers:

1

I want to do this:

>> SET [a b] reduce [(ask "a: ") (ask "b: ")]
a: 1
b: 2
== ["1" "2"]
>>

Programmatically:

args: [a b]
block: copy []
foreach arg args [
  append block to-word "("
  append block 'ask
  append block rejoin [arg ": "]
  append block to-word ")"
]
set args reduce block

But I get this error:

>>     foreach arg args [
[          append block to-word "("
[          append block 'ask
[          append block rejoin [arg ": "]
[          append block to-word ")"
[        ]
== [( ask "a: " ) ( ask "b: " )]
>>    set args reduce block
** Script Error: ( has no value
** Near: ( ask "a: " ) (
>>
+1  A: 
Hostile Fork
Great Thanks !!!!!!!!!! You save my day and many others in the future :)
Rebol Tutorial
I know the parens weren't necessary, it's just I wanted to understand WHY it doesn't work ;)
Rebol Tutorial