Skip to content

Instantly share code, notes, and snippets.

@tiesmaster
Created October 11, 2012 12:52
Show Gist options
  • Save tiesmaster/3872083 to your computer and use it in GitHub Desktop.
Save tiesmaster/3872083 to your computer and use it in GitHub Desktop.
Explanation of alias_stream...
_block
_local st_which_changes_like_output << alias_stream.new_on(@!output!)
_local write_hoi <<
_proc @write_hoi(st)
st.write("hoi")
st.newline()
_endproc
_local call_proc_with_dynamic_changed_and_callback <<
_proc @call_proc_with_dynamic_changed_and_callback(callback, st)
_dynamic !output! << internal_text_output_stream.new()
callback(st)
!terminal!.write("output would have been: ", !output!.string)
_endproc
write_hoi(st_which_changes_like_output)
call_proc_with_dynamic_changed_and_callback(write_hoi, st_which_changes_like_output)
_endblock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment