[英]Why do I get an error when I run (use 'clojure.contrib.repl-utils)?
I found that I can use Chris Houser's repl-utils library (clojure.contrib.repl-utils/source or show) for poking into Java by reading Programming Clojure book page 20. 我发现我可以使用Chris Houser的repl-utils库(clojure.contrib.repl-utils / source或show)通过阅读《 Programming Clojure》第20页来戳入Java。
I searched the web and downloaded the 'clojure-contrib.jar', and set it as a part of classpath. 我在网上搜索并下载了“ clojure-contrib.jar”,并将其设置为类路径的一部分。
The problem is I can't run the following command 问题是我无法运行以下命令
(use 'clojure.contrib.repl-utils)
on both command line clojure and emacs/slime. 在命令行clojure和emacs / slime上。
What might be wrong? 可能是什么问题? Is Chirs Houser's library is different from 'clojure-contrib.jar'?
Chirs Houser的图书馆与'clojure-contrib.jar'是否不同?
it works for me, we need more information to help you: what happend exactly when you run it? 它对我有用,我们需要更多信息来帮助您:当您运行它时,究竟发生了什么? does it raise an error?
它会引发错误吗?
I asked and got some answers . 我问了一些答案 。
In short, - it's OK to have it require, but gives me an error to refer. 简而言之,-可以要求,但是给我一个错误。 As a result, I need to use as follows
结果,我需要使用如下
user=> (require 'clojure.contrib.repl-utils) user=> (clojure.contrib.repl-utils/expression-info '(+ 1 2)) {:class java.lang.Number, :primitive? false}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.