Skip to content

Instantly share code, notes, and snippets.

@pietro909
Created May 18, 2016 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pietro909/bb2176a58d6f2e7e2a0c26fb6d748e70 to your computer and use it in GitHub Desktop.
Save pietro909/bb2176a58d6f2e7e2a0c26fb6d748e70 to your computer and use it in GitHub Desktop.
SLISW - IO - 3.1
OperatorTable addAssignOperator(":", "atPutNumber")
curlyBrackets := method(
r := Map clone
call message arguments foreach(arg,
r doMessage(arg)
)
r
)
Map atPutNumber := method(
self atPut(
call evalArgAt(0) asMutable removePrefix("\"") removeSuffix("\""),
call evalArgAt(1)
)
)
fileName := System args rest first
s := File with(fileName) openForReading contents
phoneNumbers := doString(s)
phoneNumbers asJson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment