   "Returns a random floating point number between 0 (inclusive) and
   n (default 1) (exclusive)."
   ([] (rand 1))
-  ([n] (js* "Math.random() * ~{n}")))
+  ([n] (* (Math/random) n)))
 
 (defn rand-int
   "Returns a random integer between 0 (inclusive) and n (exclusive)."
-  [n] (js* "Math.floor(Math.random() * ~{n})"))
+  [n] (Math/floor (* (Math/random) n)))
 
 (defn rand-nth
   "Return a random element of the (sequential) collection. Will have

  "Returns true if n is an integer.  Warning: returns true on underflow condition."
  [n]
  (and (number? n)
       (js* "(~{n} == ~{n}.toFixed())")))

(defn ^boolean contains?
  "Returns true if key is present in the given collection, otherwise

(defn type [x]
  (if (or (nil? x) (undefined? x))
    nil
    (.-constructor x)))

;;;;;;;;;;;;;;;;;;; protocols on primitives ;;;;;;;;
(declare hash-map list equiv-sequential)
