On Sat, Jun 19, 2010 at 5:41 AM, Heinz N. Gies he...@licenser.net wrote:
Lets get away from the argument already cast and bring a new one. It is an
impossible situation that the literal 1 in one place has a different meaning
and behavior then in another place. This is in fact a show stopper,
When the docs say not to use side-effects in a function or block of code,
they're not saying you can't use side-effects at all; it's just a reminder
that using side-effects can cause nasty surprises for one or more of these
reasons:
1. The code may be evaluated later than you expect.
2. It might
I was in to process of writing a rant against condp when I realized I had
been thinking about it all wrong. Here is what I wanted at first:
(defmacro casep [pred clauses]
`(condp #(%2 %1) ~pred ~...@clauses))
In other words, I want to be able to specify a unary predicate instead of a
binary
This is how I would write it:
(doseq [[main fixed] (map vector mainTables fixedTables)]
(println Setting up table)
(doto fixed
(.setAutoCreateColumnsFromModel false)
(.setModel (.getModel main))
(.setSelectionModel (.getSelectionModel main))
(.setFocusable false))
(let
It sounds like the doseq is the macro you're looking for, e.g.
(doseq [c my-components]
(.setVisible c true))
On Thu, Apr 8, 2010 at 5:07 PM, strattonbrazil strattonbra...@gmail.comwrote:
What's the function to call java code on multiple java components? If
I have a sequence of Java swing
The overhead of using a Clojure vector will be a little more than 2.5x on a
32-bit Sun JVM, because each Java object has an 8-byte overhead, and storing
references to those objects in a Clojure vector will use just over 4 bytes
per object. I'm not sure what the figure would be for a 64-bit JVM,
? Wouldn't they be invisible to me and the test
framework which would only see sell-or-rent?
On Feb 18, 4:27 pm, John Williams j...@pobox.com wrote:
I'm no Clojure guru myself, but one approach you may want to consider is
nest all your auxiliary functions inside the main function, and use
I'm no Clojure guru myself, but one approach you may want to consider is
nest all your auxiliary functions inside the main function, and use ordinary
let-bindings the same way you've been trying to use global bindings:
(defn sell-or-rent [{:keys [supplied-1 supplied-2]}]
(let [derived-1 (+ 1
I'm concerned specifically about exceptions that occur during macro
expansion. As often as not, these exceptions are the result of calling the
macro with incorrect arguments rather than any problem in the macro itself,
but the stack trace doesn't contain enough information to locate the
offending