Hello,
I have two newbie questions:
First
-
(ns test (:import (java.io File)))
I can use File like this
(let [file (File. filename)])))
When using this import
(ns test (:import (java.io.File)))
I get an "Unable to resolve classname: File" which I don't understand.
Second
--
With this
Hi there,
in some clojure examples I see function names with a leading dash like
-main()
-getFoo() (in backing bean)
-setBar() (in backing bean)
Are these functions with leading dash anything special? Or is this dash
required for some interop?
I didn't find any documentation about it.
Thanks
Yes, that did the trick.
Thank you.
Am 21.02.2012 02:53, schrieb Sean Corfield:
On Sat, Feb 18, 2012 at 1:29 PM, ClusterCat wrote:
(ns test (:import (java.io File)))
This says import the File class from the package java.io
(ns test (:import (java.io.File)))
Try:
(ns test (:import
In search for a Clojure bencode implentation, I found the following
source code.
(defn- decode-list [stream]
(loop [result []]
(let [c (char (.read stream))]
(if (= c \e)
result
(recur (conj result (decode stream (int c
(defn decode [stream & i]
(let [indic