Ported to Clojurescript.