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

[REBOL] Re: ' mark

From: gregg:pointillistic at: 7-Aug-2010 14:47

Hi Petri, PK> Why there must be that ' -mark in front of draw functions? PK> append plot reduce [ PK> 'fill-pen ((r * (1.0.0)) + (g * (0.1.0)) + (b * (0.0.1))) PK> 'polygon xy xy0 xy1 xy2 xy PK> ] As Ammon said, it can simplify things when using REDUCE. For example, using COMPOSE in your example would look like this: append plot compose [ fill-pen ((r * (1.0.0)) + (g * (0.1.0)) + (b * (0.0.1))) polygon (xy) (xy0) (xy1) (xy2) (xy) ] If you haven't already, read the manual where it discusses evalutation and the different word types (http://www.rebol.com/docs/core23/rebolcore-4.html). It's a key to using REBOL effectively. And play around in the console to get a feel for how things work.
>> a: 1 b: 2 c: 3
== 3
>> blk: [a b c]
== [a b c]
>> reduce blk
== [1 2 3]
>> blk: ['a b c]
== ['a b c]
>> reduce blk
== [a 2 3] -- Gregg