step9: Don't use vectors in a non-deferrable test.
authorBen Harris <bjh21@bjh21.me.uk>
Wed, 1 May 2019 11:16:11 +0000 (12:16 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Mon, 6 May 2019 11:45:53 +0000 (12:45 +0100)
According to the guide, vectors are deferrable until step A, so use
(nth () 1) in place of (nth [] 1) as a form that will generate an error.

tests/step9_try.mal

index 2558440..077c2c4 100644 (file)
@@ -15,7 +15,7 @@
 ;=>nil
 
 ;; Make sure error from core can be caught
-(try* (nth [] 1) (catch* exc (prn "exc is:" exc)))
+(try* (nth () 1) (catch* exc (prn "exc is:" exc)))
 ;/"exc is:".*(length|range|[Bb]ounds|beyond).*
 ;=>nil