[REBOL] best means of passing refinements from main to helper function? Re:(2)
From: jeff:rebol at: 15-Sep-2000 14:04
Howdy, Michael:
The following approach is exactly elegant, but it gets the
job done and it's fairly short. I think it's kind of cute.
-jeff
REBOL []
deduction: func [
/use-month month-to-use
/use-day day-to-use
][
rejoin [ "file-"
either use-month [ month-to-use ] [ now/month ]
either use-day [ day-to-use ] [ now/day ]
]
]
main: func [
/use-month month-to-use
/use-day day-to-use
] [
go?: func ['what /it][either it: get what [either true = it [what][it]][]]
do reduce compose/deep [to-path [deduction (go? use-month) (go? use-day)]
(go? month-to-use) (go? day-to-use)]
]