HCoop
/
jackhill
/
mal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1fcac41
)
step9: Don't use vectors in a non-deferrable test.
author
Ben Harris
<bjh21@bjh21.me.uk>
Wed, 1 May 2019 11:16:11 +0000
(12:16 +0100)
committer
Ben 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
patch
|
blob
|
blame
|
history
diff --git
a/tests/step9_try.mal
b/tests/step9_try.mal
index
2558440
..
077c2c4
100644
(file)
--- a/
tests/step9_try.mal
+++ b/
tests/step9_try.mal
@@
-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