ClojureとREPL駆動開発
clojure - How to Run Code Using Leiningen? - Stack Overflow
user> (in-ns 'myproject.core)
名前空間内のシンボルを全て表示
clojure - How to list the functions of a namespace? - Stack Overflow
user> (require 'myproject.core) user> (keys (ns-publics 'myproject.core))
Clojureのファイル編集後にREPLに反映
How to reload a clojure file in REPL - Stack Overflow
;; まず読み込んでシンボル一覧表示 user> (require 'myproject.core) user> (keys (ns-publics 'myproject.core)) ;; 〜ファイル編集〜 ;; (refresh)を使う user> (use '[clojure.tools.namespace.repl :only (refresh)]) user> (refresh) ;; シンボル一覧表示 → 更新されてる user> (require 'myproject.core) user> (keys (ns-publics 'myproject.core))
sh - clojure.java.shell | ClojureDocs - Community-Powered Clojure Documentation and Examples
user> (use '[clojure.java.shell :only [sh]]) user> (println (:out (sh "cowsay" "Printing a command-line output"))) ________________________________ < Printing a command-line output > -------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || nil