On Nov 11, 4:27 pm, Dave Newton [EMAIL PROTECTED] wrote:
I'd say create your own (stringish? ...) function then--since Clojure is
strongly Java-interop returning a T for a non-String would make (string? ...)
seem less useful, but that's just my opinion.
And every Java object has a
On my spare time, I've been thinking (and trying) to port Left-Fold
Enumerators (http://okmij.org/ftp/Streams.html) to Clojure for a week or
so — incidentally
(http://clojure-log.n01se.net/date/2008-11-06.html#20:41) I learnt that
Rich is also thinking about them.
Here is a report of my
FWIW, there's also a hack without java calls, which Chouser referred
to:
(binding [*ns* (find-ns 'foo)]
(eval '(def bar 3)))
although you have to create the namespace yourself if it doesn't
exist.
On Nov 11, 3:39 pm, MikeM [EMAIL PROTECTED] wrote:
This may be a horrible hack, but you can do
On my spare time, I've been thinking (and trying) to port Left-Fold
Enumerators (http://okmij.org/ftp/Streams.html) to Clojure for a week or
so — incidentally
(http://clojure-log.n01se.net/date/2008-11-06.html#20:41) I learnt that
Rich is also thinking about them.
Here is a report of my trials
Guys, thanks for all the answers. I was posting my follow ups to this
thread via Gmail until I realized that Google Groups was bouncing my
posts. @#$! Anyway, I used a ref to store my function instead of
defn'ing it. Macro expands to
(dosync (ref-set fun (fn [] ...)))
Great to hear Stuart! I've been very happy with the book so far (it's
lived up to the Pragmatic title) and am very much looking forward to
the new betas.
Just wanted to send my thanks to Rich for developing Clojure and to
Stuart for the great book. Keep up the great work!
Stuart Halloway
On Nov 12, 1:40 pm, Michael Wood [EMAIL PROTECTED] wrote:
Your hypothetical IDE, could provide what you want whether or not
longer aliases exist. There's nothing stopping someone from writing
an IDE that converts aget to array-get or [] when it reads in a file
and does the opposite when it
On Nov 12, 6:49 pm, samppi [EMAIL PROTECTED] wrote:
Onhttp://clojure.org/reader...
A shorthand version allows the metadata to be a simple symbol or
keyword, in which case it is
treated as a single entry map with a key of :tag and a value of
the symbol provided, e.g.:
#^String
On Nov 12, 7:21 pm, samppi [EMAIL PROTECTED] wrote:
Ah, yes. I meant, what are these hints? What does the compiler change?
Is it some sort of informal type enforcement or something?
The hints are described here:
http://clojure.org/java_interop#typehints
It is strictly a performance
Nevermind. I see it's fixed in the latest code in svn.
On Nov 12, 7:11 pm, Mark Volkmann [EMAIL PROTECTED] wrote:
I don't seem to be able to access the special variables *1, *2, *3 and
*e in the REPL. For example,
user= (/ 1 0)
user= (.printStackTrace *e)
outputs
java.lang.Exception:
--- On Wed, 11/12/08, Mark Volkmann wrote:
I don't seem to be able to access the special variables
*1, *2, *3 and
*e in the REPL. For example,
user= (/ 1 0)
user= (.printStackTrace *e)
outputs
java.lang.Exception: Unable to resolve symbol: *e in this context
In which environment/build?
On Wed, Nov 12, 2008 at 7:55 PM, Dave Newton [EMAIL PROTECTED] wrote:
--- On Wed, 11/12/08, Mark Volkmann wrote:
I don't seem to be able to access the special variables
*1, *2, *3 and
*e in the REPL. For example,
user= (/ 1 0)
user= (.printStackTrace *e)
outputs
java.lang.Exception:
i put this at the end of my boot.clj for added fun:
(defn iterate
returns a lazy seq of arg1, arg2 ... argn, (f arg1 ... argn), (f
arg2 ... argn (f arg1 ... argn)), etc.
[f [x rest :as all]]
(lazy-cons x (apply iterate f (concat rest [(apply f all)]
user= (take 10 (iterate + 1 1))
13 matches
Mail list logo