我已經創建的樣本命名空間:命名空間Clojure中
[demas @arch.local.net ][~/dev/projects/diary]% cat shell_space.clj
(ns shell_space)
(defn test_fu []
(println "test-shell"))
我如何使用test_fu從我的命名空間?
我曾嘗試:
[demas @arch.local.net ][~]% clj
Clojure 1.1.0-alpha-SNAPSHOT
user=> (require 'shell_space)
java.io.FileNotFoundException: Could not locate shell_space__init.class or shell_space.clj on classpath: (NO_SOURCE_FILE:0)
user=> (require '/home/demas/dev/projects/diary/shell_space)
java.lang.Exception: Invalid token: /home/demas/dev/projects/diary/shell_space java.lang.Exception: Unmatched delimiter:)
這是我的CLASSPATH:
[demas @arch.local.net ][~]% echo $CLASSPATH
/home/demas/dev/projects/diary
它適合我。你'clj'腳本里有什麼? – 2009-12-16 12:33:38
cat/usr/local/yaourt/clojure-git/clj:http://pastebin.com/m5064bea1 – demas 2009-12-16 13:45:59