Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Creating functions with local variables

From: robert:muench:robertmuench at: 30-Dec-2002 11:50

Hi, following problem: I have blocks with some code: predicate: [id = 5] action: [myvar: id * 5 print myvar] This code should be executed within an other function like this: foreach [id object] list compose/deep [ if do [(predicate)] [(action)] ] How do I make it that myvar will be a local word? At the moment myvar will be a global word. Next question is how can I create a function from ACTION with local words and specific signature? myfunc: func [id object] action Robert