evaluator: add user-defined functions

This commit is contained in:
2018-04-30 18:08:01 +02:00
parent 013c0844c7
commit 127d2e4ad8
23 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
as yet unclassified
testProcedureDefinition
| proc |
ph parseAndEval: '(define squared (lambda (x) (* x x)))'.
proc := ph parseAndEval: #squared.
self assert: proc params equals: #(#x).
self assert: proc body equals: #(#* #x #x)