9 lines
183 B
Smalltalk
9 lines
183 B
Smalltalk
Object subclass: #Example.
|
|
|
|
Example extend [
|
|
foo: x [
|
|
^ 42 + x ] ].
|
|
|
|
symbol := 'foo:' asSymbol. " same as symbol := #foo: "
|
|
|
|
Example new perform: symbol with: 5. " returns 47 "
|