Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bindings can be omitted from eval

  • Loading branch information...
commit 6a17f0b3c7b3571f60f7838de50d6aae91fdf23b 1 parent cbb4dc4
James Reeves authored

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. +6 4 src/comb/template.clj
10 src/comb/template.clj
@@ -54,7 +54,9 @@
54 54 (defn eval
55 55 "Evaluate a template using the supplied bindings. The template source may
56 56 be a string, or an I/O source such as a File, Reader or InputStream."
57   - [source bindings]
58   - (let [keys (map (comp symbol name) (keys bindings))
59   - func (compile-fn [{:keys keys}] source)]
60   - (func bindings)))
  57 + ([source]
  58 + (eval source {}))
  59 + ([source bindings]
  60 + (let [keys (map (comp symbol name) (keys bindings))
  61 + func (compile-fn [{:keys keys}] source)]
  62 + (func bindings))))

0 comments on commit 6a17f0b

Please sign in to comment.
Something went wrong with that request. Please try again.