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: " ) (
>>