Advertisement
Revolucent

Untitled

Feb 24th, 2016
1,200
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Homoiconicity in REBOL
  2.  
  3. ; This is a normal foreach statement:
  4. foreach x [1 2 3] [
  5.     print x
  6. ]
  7.  
  8. ; Here's a homoiconic one:
  9. forbody: [print x] ; Here we assign [print x] to the variable forbody
  10. foreach x [1 2 3] forbody ; This has the same effect as the normal foreach above
Advertisement
RAW Paste Data Copied
Advertisement