Posted By

reboltutorial on 04/23/10


Tagged

REBOL


Versions (?)

set+


 / Published in: R
 

URL: http://reboltutorial.com

  1. set+: func [ ; Inspired by Erlang's list model.
  2. "Like SET, but words block is dialected."
  3. words [any-block!] "Word after | gets remainder of series."
  4. series [series!]
  5. /local word= rule=
  6. ][
  7. word=: [set word word!]
  8. rule=: [
  9. any [
  10. '| word= (set word series) to end
  11. | word= (
  12. set word pick series 1
  13. series: next series
  14. )
  15. ]
  16. ]
  17. parse words rule=
  18. ]

Report this snippet  

You need to login to post a comment.