Advertisement
Revolucent

Untitled

Feb 24th, 2016
3,448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
REBOL 0.28 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement