Hi,
Am 23.05.2009 um 08:43 schrieb Josip Gracin:
I'm getting unexpected behavior trying to use binding and map. Here's
what happens.
(def *v*)
(defn fun [i] *v*)
(defn bv []
(binding [*v* 100]
(map fun [1 2])))
Evaluating (bv) throws "Var *v* is unbound exception". I expected it
to retu
Thanks Chouser, very nice! I am quite aware of the performance boost
of using ints instead of strings -- this was an intentional choice on
my part. When I first solved the problem, I wrote it in Scala and used
ints.
I have one question for you, and this will show my OOP roots :-) How
would you en
On Sat, May 23, 2009 at 9:37 AM, Meikel Brandmeyer wrote:
> So this is no bug, but expected behaviour.
I get it. Thanks Meikel!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this grou
Here's how I implemented the ">>>" operator for ints:
(let [intmask (dec (bit-shift-left 1 32))]
(defmacro ushr [x n] `(int (bit-shift-right (bit-and ~intmask ~x)
~n
The (bit-and intmask x) expression effectively gives you the unsigned
equivalent of x. For bytes, use 255 instead of intmas
Put them in a namespace.
(ns prime-seive)
... definitions ...
On Saturday, May 23, 2009, michaelg wrote:
>
> Thanks Chouser, very nice! I am quite aware of the performance boost
> of using ints instead of strings -- this was an intentional choice on
> my part. When I first solved the problem,
Hi Tom,
I like the docs a lot. Thanks for making the robot!
I have a suggestion for a refinement.
We've received an issue for clojure-contrib noting that the doc for
zip-filter at:
http://code.google.com/p/clojure-contrib/wiki/ZipFilterApiDoc
contains:
Usage:
(ns
On Sat, May 23, 2009 at 11:41 AM, David Nolen wrote:
>
> Put them in a namespace.
>
> (ns prime-seive)
>
> ... definitions ...
Yes, this would probably be best. Then you can use 'defn-' instead of 'defn'
for all the function definitions that you want to keep private.
Another option that is usu
That's a very elegant way of expressing it. Thanks for that tip Kevin.
-Patrick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsub
Hi,
clojure.contrib.types/deftype assumes data to tag are created fresh
with no meta data. Would it be useful to have it update meta data if
data are already initialized with meta data, e.g. from file or db with
other meta data, but :type ::constructor are too program specific to
be stored in the
On May 24, 1:01 am, Feng wrote:
> Hi,
>
> clojure.contrib.types/deftype assumes data to tag are created fresh
> with no meta data. Would it be useful to have it update meta data if
> data are already initialized with meta data, e.g. from file or db with
> other meta data, but :type ::constructo
10 matches
Mail list logo