#clojure log - Feb 17 2008

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:20 jh06: omg

0:21 I am having the hardest time with the Java classpath

0:21 I have three jars in a single folder

0:21 and I've set my CLASSPATH=jar1:jar2:jar3; but Java continues to give me errors when I try to invoke one of the classes from the jars

0:25 ha

0:25 after having problems for an hours, the first time I complain about it on IRC I get it to work...

21:47 ericthor_: what do you think is a good strategy for dealing with invariants for function arguments when you want to provide meanful error messages (clojure idiomatic of course)

21:47 consider:

21:47 (defn go-left

21:47 [{item :item {left :left up :up right :right :as path } :path}]

21:47 (cond (= top path) "error - left of top called"

21:47 (nil? left) "error - left of first"

21:47 :else (struct loc left (struct node left up (:right item)))))

21:48 here I'm destructuring the arguments (amazing by the way) and i have a couple of conditions to check for where I want to fail...i guess throw an exception

Logging service provided by n01se.net