Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Speculative + Expound in Klipse
(require '[cljs.spec.alpha :as s])
(require '[cljs.spec.test.alpha :as stest])
(require '[expound.alpha :as expound])
(require '[speculative.instrument :refer [instrument]])
(require '[clojure.string :as str])
(defonce instrument-fns
(do (set! s/*explain-out* (expound/custom-printer
{:show-valid-values? true}))
(eval (cons 'do (for [sym speculative.impl.syms/instrumentable-syms-cljs]
`(stest/instrument-1 [:quote ~sym]))))))
(try
;; insert your call here
;; choose of the functions listed in the bottom left quadrant
(subs "foo" -1)
(catch :default e
(println e)))
speculative.impl.syms/instrumentable-syms-cljs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment