Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reader syntax for hash-table

  • Loading branch information...
commit 60f3836cb3906892056a17fec7bb1c7b5046f198 1 parent a5041e7
@netguy204 authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 hash-table.sch
View
6 hash-table.sch
@@ -156,3 +156,9 @@
(define (hash-set! ht key value)
"Store value into hash table at key."
(put ht key value))
+
+(define-macro-character (#\{ stream)
+ "provide hash-table reader syntax"
+ (let ((new (make-hash-table))
+ (values (read:list stream #\})))
+ (into new values)))
Please sign in to comment.
Something went wrong with that request. Please try again.