summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-06-16 23:46:19 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2011-06-16 23:46:19 +0200
commit4e206241aeaee801de8e1d0b86048ecc462b27eb (patch)
tree115bbd607128265f8c832efd6ee35c608f063d82
parented136e498bdc4a4c0dda61d53e0a0ad05a51b18d (diff)
Improve dictionary resolution efficiency a bit.
-rw-r--r--json-template.rkt7
1 files changed, 4 insertions, 3 deletions
diff --git a/json-template.rkt b/json-template.rkt
index 0629178..384f31f 100644
--- a/json-template.rkt
+++ b/json-template.rkt
@@ -217,9 +217,10 @@
[(dict? context)
(let ([y (dict-ref context
(car path)
- (dict-ref context
- (string->symbol (car path))
- nothing))])
+ (λ ()
+ (dict-ref context
+ (string->symbol (car path))
+ nothing)))])
(if (eq? y nothing)
(values #f #f)
(resolve-path-in-object y (cdr path))))]