Metacadr's reuse doesn't kill people. Mutation kills people!
Updated metacadr's test suite to ensure that re-using a metacadr-generated function does not lead to crashes. Saw this a lot in early versions of LISP.
This commit is contained in:
parent
d9345c513a
commit
3a59d3f2f1
|
@ -72,4 +72,7 @@ describe 'Metacadr Complex', ->
|
|||
['caaddr', 'X']]
|
||||
do (t, v) ->
|
||||
it "The #{t} should read #{v}", ->
|
||||
expect(metacadr(t)(mccomplex)).to.equal(v)
|
||||
mcadr = metacadr(t)
|
||||
expect(mcadr mccomplex).to.equal(v)
|
||||
expect(mcadr mccomplex).to.equal(v)
|
||||
expect(mcadr mccomplex).to.equal(v)
|
||||
|
|
Loading…
Reference in New Issue