On Jul 7, 5:02 am, Mike wrote:
> (not sure where my reply to Chouser et al. went, but basically I said
> that I was writing a macro and I might be overdoing it. I was right!)
>
> Here's what I was trying to accomplish, but in functions, not macros:
>
> (defn slice
> "Returns a lazy sequence co
On Jul 6, 6:00 pm, Chouser wrote:
> On Mon, Jul 6, 2009 at 4:18 PM, Meikel Brandmeyer wrote:
> > Hi,
>
> > Am 06.07.2009 um 22:00 schrieb Chouser:
>
> >> Or if you really do need a list:
>
> >> (for [x [1 2 3]] (cons 'some-symbol (list x)))
>
> > o.O
>
> > *cough*(list 'some-symbol x)*cough* ;
(not sure where my reply to Chouser et al. went, but basically I said
that I was writing a macro and I might be overdoing it. I was right!)
Here's what I was trying to accomplish, but in functions, not macros:
(defn slice
"Returns a lazy sequence composed of every nth item of
coll, starti
On Jul 6, 4:00 pm, Chouser wrote:
> On Mon, Jul 6, 2009 at 3:47 PM, Sean Devlin wrote:
>
> > I think your unquote is okay. ClojureQL does something similar.
>
> > However, my gut says this should be in a doseq, not a for statement.
> > Could be totally wrong, tough.
>
> I think the OP is trying
>
> Or if you really do need a list:
>
> (for [x [1 2 3]] (cons 'some-symbol (list x)))
>
Why not
(for [x [1 2 3]] (list 'some-symbol x))
?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post t
On Mon, Jul 6, 2009 at 4:18 PM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 06.07.2009 um 22:00 schrieb Chouser:
>
>> Or if you really do need a list:
>>
>> (for [x [1 2 3]] (cons 'some-symbol (list x)))
>
> o.O
>
> *cough*(list 'some-symbol x)*cough* ;)
Oh. Right. What he said.
--Chouser
--~--~--
Hi,
Am 06.07.2009 um 22:00 schrieb Chouser:
Or if you really do need a list:
(for [x [1 2 3]] (cons 'some-symbol (list x)))
o.O
*cough*(list 'some-symbol x)*cough* ;)
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
On Mon, Jul 6, 2009 at 3:47 PM, Sean Devlin wrote:
>
> I think your unquote is okay. ClojureQL does something similar.
>
> However, my gut says this should be in a doseq, not a for statement.
> Could be totally wrong, tough.
I think the OP is trying to build and return a list, not
trying to exec
I think your unquote is okay. ClojureQL does something similar.
However, my gut says this should be in a doseq, not a for statement.
Could be totally wrong, tough.
My $.02
Sean
On Jul 6, 2:39 pm, Mike wrote:
> Newbie question here. Probably answered in Stu's book, but I forgot
> it at home
Newbie question here. Probably answered in Stu's book, but I forgot
it at home today.
is:
(for [x [1 2 3]] `(some-symbol ~x))
dangerous? I mean, assuming that some-symbol is bound and all. At
the REPL I get
((user/some-symbol 1) (user/some-symbol 2) (user/some-symbol 3))
which is what I'm
10 matches
Mail list logo