Skip to content

Instantly share code, notes, and snippets.

@lsparrish
Created October 1, 2012 01:03
Show Gist options
  • Select an option

  • Save lsparrish/3808899 to your computer and use it in GitHub Desktop.

Select an option

Save lsparrish/3808899 to your computer and use it in GitHub Desktop.
Generator in Retro
( generator )
{{
: xt, ( - ) 1 , @last @d->xt , ;
---reveal---
: yield ( - ) 1 , here 5 + , xt, [ :is ] , 9 , xt, [ :devector ] , ;
compile-only
}}
: foo ( - ) "State one" puts yield
"State two" puts ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment