开发者

Why do I get an error when I run (use 'clojure.contrib.repl-utils)?

开发者 https://www.devze.com 2023-01-09 14:37 出处:网络
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.

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.

I searched the web and downloaded the 'clojure-contrib.jar', and set it as a part of classpath.

The problem is I can't run the following command

(use 'clojure.contrib.r开发者_如何学Pythonepl-utils)

on both command line clojure and emacs/slime.

What might be wrong? Is Chirs Houser's library is different from 'clojure-contrib.jar'?


FOUND A SOLUTION

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}
0

精彩评论

暂无评论...
验证码 换一张
取 消