Hi,
When I run this expression:
(map (fn [x] (println x) x) (range 5))
I expect to get (0 1 2 3 4) but instead I get (0 1 2 3 4 0 1 2 3 4)
It seems like the println output is included in the result list.
Am I missing something?
--
You received this message because you are subscribed to the
When I run this expression:
(map (fn [x] (println x) x) (range 5))
I expect to get (0 1 2 3 4) but instead I get (0 1 2 3 4 0 1 2 3 4)
It seems like the println output is included in the result list.
Am I missing something?
The REPL is fooling you.
(def *x (map (fn [x] (println x) x)
That's a big relieve.
Thanks for the answer!
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To
Hi,
I am reading Joy of Clojure, there is the following sample in 8.1.1:
(defn contextual-eval [ctx expr]
(eval
`(let [~@(mapcat (fn [[k v]] [k `'~v]) ctx)]
~expr)))
And the sample output:
(contextual-eval {'a 1, 'b 2} '(+ a b))
;= 3
(contextual-eval {'a 1, 'b 2} '(let [b 1000] (+ a
This seems interesting, if there's not a BOF let's meet informally anyway
!
On Mon, Oct 17, 2011 at 1:40 AM, Frank Siebenlist
frank.siebenl...@gmail.com wrote:
Is there any interest to organize some form of ClojureScript Mobile BOF
at the Clojure/conj?
(some informal, ad hoc get-together
The hotel bar may be a good backup venue ;-)
On Oct 17, 2011, at 9:17 AM, Federico Brubacher wrote:
This seems interesting, if there's not a BOF let's meet informally anyway !
On Mon, Oct 17, 2011 at 1:40 AM, Frank Siebenlist
frank.siebenl...@gmail.com wrote:
Is there any interest to
In some versions of Scheme or Lisp, there is a flag that you can set so that
the reader will create exact numbers by default (BigDecimal) instead of
inexact doubles.
Is there a way to do this in Clojure?
Scott Hickey
--
You received this message because you are subscribed to the Google
Guofeng Zhang guof...@radvision.com writes:
I do not understand why `'~v has be to used this way. If I used
`~v instead (that is, remove the quote), it still works. So my
question is, why ~v needs to be first quoted and then syntax-quoted?
I'm not the most experienced Clojure programmer, but
On Mon, 2011-10-17 at 04:32 +, Guofeng Zhang wrote:
`(let [~@(mapcat (fn [[k v]] [k `'~v]) ctx)]
And the sample output:
(contextual-eval {'a 1, 'b 2} '(+ a b))
I do not understand why `'~v has be to used this way. If I used `~v
instead (that is, remove the quote), it still works.
On Oct 17, 12:50 pm, Marshall T. Vandegrift llas...@gmail.com
wrote:
Guofeng Zhang guof...@radvision.com writes:
I do not understand why `'~v has be to used this way. If I used
`~v instead (that is, remove the quote), it still works. So my
question is, why ~v needs to be first quoted and
Hi,
you are looking for 1.3M?
Sincerely
Meikel
--
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
Note that posts from new members are moderated - please be patient with your
first post.
To
I've been using 1.2 but I would be OK with a solution in any version.
Scott Hickey
--
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
Note that posts from new members are moderated - please be
Hi,
I meant this:
Clojure 1.2.0
user= (type 1.0M)
java.math.BigDecimal
Sincerely
Meikel
--
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
Note that posts from new members are moderated -
Hi,
As I understand it, clojurescript uses some unicode characters to identify
keywords/symbols.
I guess that's why (str 'a) gives me ï·‘'a
I thought that this was intentional, and that (name 'a) would give me a,
but I got the same result as with (str).
So how do I extract the name from a symbol
Are you using ClojureScript HEAD? If you are and you are still seeing this
under what conditions (advanced mode, browser REPL, etc.) ?
David
On Mon, Oct 17, 2011 at 6:41 PM, Jonathan Fischer Friberg
odysso...@gmail.com wrote:
Hi,
As I understand it, clojurescript uses some unicode
I am trying to follow the directions at
http://dev.clojure.org/display/doc/Getting+Started+with+Emacs.
1. I want to install the Emacs Starter Kit. The directions at
http://dev.clojure.org/display/doc/Getting+Started+with+Emacs mention
GNU Emacs 23 or 24 is recommended, however
On Mon, Oct 17, 2011 at 8:32 PM, Bruce Gordon brucebgor...@gmail.com wrote:
I am trying to follow the directions at
http://dev.clojure.org/display/doc/Getting+Started+with+Emacs.
1. I want to install the Emacs Starter Kit. The directions at
Hi,
I had the honor of doing a presentation on 'Introduction to Clojure'
at Silicon Valley Code Camp on October 8th. It was the first
presentation on Clojure at SVCC
http://www.siliconvalley-codecamp.com/Sessions.aspx.
The importance to Clojure could be felt being given the first time
slot of
18 matches
Mail list logo