vendor/node_modules/wisp/src/reader.wisp in ruby-wisp-source-0.7.0 vs vendor/node_modules/wisp/src/reader.wisp in ruby-wisp-source-0.8.0

- old
+ new

@@ -1,13 +1,17 @@ -(import [list list? count empty? first second third rest map vec - cons conj rest concat last butlast sort lazy-seq] "./sequence") -(import [odd? dictionary keys nil? inc dec vector? string? - number? boolean? object? dictionary? - re-pattern re-matches re-find str subs char vals = ==] "./runtime") -(import [symbol? symbol keyword? keyword meta with-meta name - gensym] "./ast") -(import [split join] "./string") +(ns wisp.reader + "Reader module provides functions for reading text input + as wisp data structures" + (:use [wisp.sequence :only [list list? count empty? first second third rest + map vec cons conj rest concat last butlast sort + lazy-seq]] + [wisp.runtime :only [odd? dictionary keys nil? inc dec vector? string? + number? boolean? object? dictionary? re-pattern + re-matches re-find str subs char vals =]] + [wisp.ast :only [symbol? symbol keyword? keyword meta with-meta name + gensym]] + [wisp.string :only [split join]])) (defn push-back-reader "Creates a StringPushbackReader from a given string" [source uri] {:lines (split source "\n") :buffer "" @@ -470,10 +474,10 @@ :else {})) (defn lambda-params [body] (let [names (sort (vals (lambda-params-hash body))) variadic (= (first names) (symbol "%&")) - n (if (and variadic (== (count names) 1)) + n (if (and variadic (identical? (count names) 1)) 0 (parseInt (rest (name (last names))))) params (loop [names [] i 1] (if (<= i n)