Skip to content

tggreene/hashc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hashc

Clojars Project

Shameless plaigarism of hashp for console.log in cljs:

(ns example.core)

(defn mean [xs]
  (/ (double #c (reduce + xs)) #c (count xs)))

Evaluating the form:

(mean (range 10)) ;; => 4.5

Browser console:

#c[example.core/mean::4] (reduce + xs) => 45
#c[example.core/mean::4] (count xs) => 10

The primary difference being that the output will use cljs devtools formatters if available (automatically added by shadow-cljs) to print the resulting value.

It doesn't currently print output to stdout, only to the browser console.

About

console.log shorthand for cljs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published