Skip to content

Instantly share code, notes, and snippets.

@briantrice
Created October 31, 2010 01:52
Show Gist options
  • Save briantrice/656005 to your computer and use it in GitHub Desktop.
Save briantrice/656005 to your computer and use it in GitHub Desktop.
Implementation
n@(Syntax Partial traits) er &environment: env
[| block message |
block: n surroundings Block new.
message: n message copy.
message arguments infect:
[| :arg |
(arg is: n surroundings Placeholder)
ifTrue: [n surroundings LoadVariable from: block addInputVariable]
ifFalse: [arg]].
block statements: {message}.
block
].
slate[4]> #(3 + _) `er applyTo: {4}.
7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment