Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

(coerce nil 'cons) now returns nil

  • Loading branch information...
commit 23f02ccd994625e9339bec7da27f7c0f39cfc06c 1 parent c695d1d
Pauan Pauan authored
Showing with 6 additions and 1 deletion.
  1. +1 −0  ac.ss
  2. +2 −1  run-tests
  3. +3 −0  tests/coerce
1  ac.ss
View
@@ -400,6 +400,7 @@ My failed attempt to make fn return a value. We can return to this later.
(else (err "Can't coerce" x type))))
((eq? x 'nil) (case type
((string) "")
+ ((cons) 'nil)
(else (err "Can't coerce" x type))))
((symbol? x) (case type
((string) (symbol->string x))
3  run-tests
View
@@ -15,4 +15,5 @@
"tests/coerce"
"tests/fn"
"tests/re"
- "tests/(coerce foo 'fn)")
+ "tests/(coerce foo 'fn)"
+)
3  tests/coerce
View
@@ -52,5 +52,8 @@ nil
>>> (coerce "" 'sym)
||
+>>> (coerce (coerce "" 'sym) 'string)
+""
+
>>> (coerce "" 'cons)
nil
Please sign in to comment.
Something went wrong with that request. Please try again.