Skip to content

Instantly share code, notes, and snippets.

Created Nov 28, 2011
What would you like to do?
OperatorTable addAssignOperator(":", "atPutNumber")
curlyBrackets := method(
r := Map clone
call message arguments foreach(arg,
r doMessage(arg)
Map atPutNumber := method(
self atPut(
call evalArgAt(0) asMutable removePrefix("\"") removeSuffix("\""),
call evalArgAt(1))
pn := doString("{ \"Ed Muller\": \"555-555-1212\" }")
pn keys println
pn values println
> io
list(Ed Muller)
^^ works
via the repl \/ it doesn't. I get...
pn := doString("{ \"Ed Muller\": \"555-555-1212\" }")
Exception: Map does not respond to 'call'
Map call Command Line 1
Object curlyBrackets doString 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment