REBOL Programming/Design Guide/Take advantage of return values

From Wikibooks, the open-content textbooks collection

< REBOL Programming | Design Guide
Jump to: navigation, search

Many functions return useful values.

For instance, the INSERT function returns the series just past the insertion.

IF, EITHER, and most of the looping functions return the value of the block they evaluated.

>> j: 0
== 0
>> print foreach entry [red green blue water aqua] [j: j + 1]
5
Personal tools
Create a book
  • Add wiki page
  • Collections help