为什么我运行时得到错误(使用'clojure.contrib.repl-utils)? [英] Why do I get an error when I run (use 'clojure.contrib.repl-utils)?

查看:82
本文介绍了为什么我运行时得到错误(使用'clojure.contrib.repl-utils)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我可以使用Chris Houser的repl-utils库(clojure.contrib.repl-utils / source或show)通过阅读Programming Clojure book page 20来进入Java。



我在网上搜索并下载了'clojure-contrib.jar',并将其设置为classpath的一部分。



问题是我可以' t运行以下命令

 (使用clojure.contrib.repl-utils)



这两个命令行可能是错误的?

解决方案

找到解决方案



我问过一些答案



总之, - 它有它的要求,但给我一个错误,提及。因此,我需要使用如下

 
user =>(require'clojure.contrib.repl-utils)
user =>(clojure.contrib.repl-utils / expression-info'(+ 1 2))
{:class java.lang.Number,:primitive? false}


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.repl-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}

这篇关于为什么我运行时得到错误(使用'clojure.contrib.repl-utils)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆