Skip to content

Instantly share code, notes, and snippets.

@hashmal
Created March 1, 2014 23:22
Show Gist options
  • Select an option

  • Save hashmal/9299195 to your computer and use it in GitHub Desktop.

Select an option

Save hashmal/9299195 to your computer and use it in GitHub Desktop.

Revisions

  1. hashmal created this gist Mar 1, 2014.
    12 changes: 12 additions & 0 deletions messageSerialization.io
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    Message justSerialized := method(stream,
    stream write(name)
    if(arguments size > 0,
    stream write("(")
    stream write(arguments map(serialized) join(", "))
    stream write(")")
    )
    if (next,
    if (next isEndOfLine not, stream write(" "))
    stream write(next serialized)
    )
    )