Re: Using map to produce side effects, not working

2019-02-08 Thread Alan Thompson
Also remember that `mapv` is not lazy and will force the map to run right
away, which helps if side-effecty things like `println` are a part of the
function.

On Thu, Feb 7, 2019 at 10:54 AM Justin Smith  wrote:

> also do note that clojure.core/run! is designed for two-arg map when
> it's only run for side effects, and clojure.core/doseq is designed for
> nested side-effecting iteration
>
> On Thu, Feb 7, 2019 at 3:33 AM Pierpaolo Tofani
>  wrote:
> >
> > Thanks ! Your diagnosis is correct. With two dorun works fine.
> >
> > Il giorno giovedì 7 febbraio 2019 12:19:40 UTC+1, Orestis Markou ha
> scritto:
> >>
> >> Without having ran your code, it seems that the inner map is not
> wrapped in a doall, so while the outer lazy-seq is forced, the inner is not.
> >>
> >> This might be of interest to you:
> http://clojure-doc.org/articles/language/laziness.html
> >>
> >> If you only want to do map for side effects, you could use dorun
> instead of doall.
> >>
> >> On 7 Feb 2019, at 12:04 PM, Pierpaolo Tofani 
> wrote:
> >>
> >> Hi
> >> i am new in clojure sorry.
> >> In the snippet of code i used two map functions only to produce side
> effects on two ref.
> >> Even using doall no affect is produced on ref aaa and zzz, seems that
> the sequence is still lazy.
> >> But if i remove the final :done , and the repl show me the sequence
> produced (that i don't care) the ref aaa and zzz are affected.Thanks in
> advance.
> >> PS The two map are in effect doing a for.
> >>
> >> (def aaa (ref 0))
> >> (def zzz (ref 0))
> >> (def s1 [1 2 3 4 5])
> >> (def s2 [1 2 3 4 5])
> >> (defn make-side []
> >> (do
> >> (doall
> >> (map
> >>   (fn [x]
> >> (map
> >>   (fn [y]
> >> (dosync
> >>   (alter aaa inc)
> >>   (alter zzz dec)
> >> )
> >> )
> >>   s2))
> >>   s1)
> >> )
> >> :done
> >> )
> >> )
> >>
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Clojure" group.
> >> To post to this group, send email to clo...@googlegroups.com
> >> Note that posts from new members are moderated - please be patient with
> your first post.
> >> To unsubscribe from this group, send email to
> >> clojure+u...@googlegroups.com
> >> For more options, visit this group at
> >> http://groups.google.com/group/clojure?hl=en
> >> ---
> >> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> >> To unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+u...@googlegroups.com.
> >> For more options, visit https://groups.google.com/d/optout.
> >>
> >>
> > --
> > 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 unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map to produce side effects, not working

2019-02-07 Thread Justin Smith
also do note that clojure.core/run! is designed for two-arg map when
it's only run for side effects, and clojure.core/doseq is designed for
nested side-effecting iteration

On Thu, Feb 7, 2019 at 3:33 AM Pierpaolo Tofani
 wrote:
>
> Thanks ! Your diagnosis is correct. With two dorun works fine.
>
> Il giorno giovedì 7 febbraio 2019 12:19:40 UTC+1, Orestis Markou ha scritto:
>>
>> Without having ran your code, it seems that the inner map is not wrapped in 
>> a doall, so while the outer lazy-seq is forced, the inner is not.
>>
>> This might be of interest to you: 
>> http://clojure-doc.org/articles/language/laziness.html
>>
>> If you only want to do map for side effects, you could use dorun instead of 
>> doall.
>>
>> On 7 Feb 2019, at 12:04 PM, Pierpaolo Tofani  wrote:
>>
>> Hi
>> i am new in clojure sorry.
>> In the snippet of code i used two map functions only to produce side effects 
>> on two ref.
>> Even using doall no affect is produced on ref aaa and zzz, seems that the 
>> sequence is still lazy.
>> But if i remove the final :done , and the repl show me the sequence produced 
>> (that i don't care) the ref aaa and zzz are affected.Thanks in advance.
>> PS The two map are in effect doing a for.
>>
>> (def aaa (ref 0))
>> (def zzz (ref 0))
>> (def s1 [1 2 3 4 5])
>> (def s2 [1 2 3 4 5])
>> (defn make-side []
>> (do
>> (doall
>> (map
>>   (fn [x]
>> (map
>>   (fn [y]
>> (dosync
>>   (alter aaa inc)
>>   (alter zzz dec)
>> )
>> )
>>   s2))
>>   s1)
>> )
>> :done
>> )
>> )
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@googlegroups.com
>> Note that posts from new members are moderated - please be patient with your 
>> first post.
>> To unsubscribe from this group, send email to
>> clojure+u...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map to produce side effects, not working

2019-02-07 Thread Erik Assum
Just as a note, you should probably use `doseq` when you want to produce side 
effects.

Erik.

> On 7 Feb 2019, at 12:04, Pierpaolo Tofani  wrote:
> 
> Hi
> i am new in clojure sorry. 
> In the snippet of code i used two map functions only to produce side effects 
> on two ref. 
> Even using doall no affect is produced on ref aaa and zzz, seems that the 
> sequence is still lazy.
> But if i remove the final :done , and the repl show me the sequence produced 
> (that i don't care) the ref aaa and zzz are affected.Thanks in advance.
> PS The two map are in effect doing a for.
> 
> (def aaa (ref 0))
> (def zzz (ref 0))
> (def s1 [1 2 3 4 5])
> (def s2 [1 2 3 4 5])
> (defn make-side []
> (do   
> (doall   
> (map
>   (fn [x]
> (map
>   (fn [y]
> (dosync
>   (alter aaa inc)
>   (alter zzz dec)
> )
> )
>   s2))
>   s1)
> )
> :done
> )
> )
> 
> 
> -- 
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map to produce side effects, not working

2019-02-07 Thread Pierpaolo Tofani
Thanks ! Your diagnosis is correct. With two dorun works fine.

Il giorno giovedì 7 febbraio 2019 12:19:40 UTC+1, Orestis Markou ha scritto:
>
> Without having ran your code, it seems that the inner map is not wrapped 
> in a doall, so while the outer lazy-seq is forced, the inner is not.
>
> This might be of interest to you: 
> http://clojure-doc.org/articles/language/laziness.html
>
> If you only want to do map for side effects, you could use dorun instead 
> of doall.
>
> On 7 Feb 2019, at 12:04 PM, Pierpaolo Tofani  > wrote:
>
> Hi
> i am new in clojure sorry. 
> In the snippet of code i used two map functions only to produce side 
> effects on two ref. 
> Even using doall no affect is produced on ref aaa and zzz, seems that the 
> sequence is still lazy.
> But if i remove the final :done , and the repl show me the sequence 
> produced (that i don't care) the ref aaa and zzz are affected.Thanks in 
> advance.
> PS The two map are in effect doing a for.
>
> (def aaa (ref 0))
> (def zzz (ref 0))
> (def s1 [1 2 3 4 5])
> (def s2 [1 2 3 4 5])
> (defn make-side []
> (do   
> (doall   
> (map
>   (fn [x]
> (map
>   (fn [y]
> (dosync
>   (alter aaa inc)
>   (alter zzz dec)
> )
> )
>   s2))
>   s1)
> )
> :done
> )
> )
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com 
> Note that posts from new members are moderated - please be patient with 
> your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map to produce side effects, not working

2019-02-07 Thread Orestis Markou
Without having ran your code, it seems that the inner map is not wrapped in a 
doall, so while the outer lazy-seq is forced, the inner is not.

This might be of interest to you: 
http://clojure-doc.org/articles/language/laziness.html 


If you only want to do map for side effects, you could use dorun instead of 
doall.

> On 7 Feb 2019, at 12:04 PM, Pierpaolo Tofani  
> wrote:
> 
> Hi
> i am new in clojure sorry. 
> In the snippet of code i used two map functions only to produce side effects 
> on two ref. 
> Even using doall no affect is produced on ref aaa and zzz, seems that the 
> sequence is still lazy.
> But if i remove the final :done , and the repl show me the sequence produced 
> (that i don't care) the ref aaa and zzz are affected.Thanks in advance.
> PS The two map are in effect doing a for.
> 
> (def aaa (ref 0))
> (def zzz (ref 0))
> (def s1 [1 2 3 4 5])
> (def s2 [1 2 3 4 5])
> (defn make-side []
> (do   
> (doall   
> (map
>   (fn [x]
> (map
>   (fn [y]
> (dosync
>   (alter aaa inc)
>   (alter zzz dec)
> )
> )
>   s2))
>   s1)
> )
> :done
> )
> )
> 
> 
> -- 
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map inc fails on windows

2016-01-11 Thread Igwe Ogba
Hi everyone,
Just tested it in another command prompt. It works perfectly now
   Also running (doc map) returns nil in the console which outputs the 
wrong answer
  The program clojure-noob  (core.clj) only prints out one line so it is 
hard to see how it could change the definition of map.
  *1 returns [1 2 4] with Clojure version 1.7.0

  I'm just a bit worried my clojure programs will run off with a mind of 
their own from time to time but no matter. Will update to 1.8 once it's 
released

On Monday, January 11, 2016 at 6:16:29 PM UTC+1, Igwe Ogba wrote:
>
>
>
> 
> Hello. I'm still a Clojure newbie and had a bit of code return what seems 
> to be the wrong value.
>
>
>
> 
> After typing in (map inc [1 2 3 4]) I would expect to get [2 3 4 5]. 
> However my Clojure repl returns [1 2 3 4]. This is happening on windows. 
> I've included a screenshot as well. Is this sort of behaviour (where the 
> wrong answer appears) normal in Clojure and are there any implications for 
> real time code?
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map inc fails on windows

2016-01-11 Thread David Powell
this doesn't happen for me, it looks like you have something weird going on
with your environment.

how are you starting your repl?

what does (clojure-version) return?

has map somehow been redefined?  is your namespace importing something that
clobbers map?  does (doc map) print the standard docs for that function?


On Mon, Jan 11, 2016 at 5:08 PM, Igwe Ogba  wrote:

>
>
> 
> Hello. I'm still a Clojure newbie and had a bit of code return what seems
> to be the wrong value.
>
>
>
> 
> After typing in (map inc [1 2 3 4]) I would expect to get [2 3 4 5].
> However my Clojure repl returns [1 2 3 4]. This is happening on windows.
> I've included a screenshot as well. Is this sort of behaviour (where the
> wrong answer appears) normal in Clojure and are there any implications for
> real time code?
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map inc fails on windows

2016-01-11 Thread gildraug
I'm not really expert in Windows, but it looks like some output 
problem, because REPL prints not the real result, but last element of 
the previously entered form: map should return sequence (e. g., (1 2 3 
4)) and not vector ([0 1 2 4]). Also, REPL stores result of the last 
evaluated expression in *1, so you could check what is stored in it 
right after evaluating (map ...).


Написано пн, січ 11, 2016 at 7:08 , Igwe Ogba 
:


Hello. I'm still a Clojure newbie and had a bit of code return what 
seems to be the wrong value.





After typing in (map inc [1 2 3 4]) I would expect to get [2 3 4 5]. 
However my Clojure repl returns [1 2 3 4]. This is happening on 
windows. I've included a screenshot as well. Is this sort of 
behaviour (where the wrong answer appears) normal in Clojure and are 
there any implications for real time code?

--
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, 
send an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map inc fails on windows

2016-01-11 Thread Jason Felice
I would expect what you expect.  Are you sure there's nothing in the
clojure-noob.core namespace which redefines map?  If not, try restarting
the REPL in case map got clobbered somehow.

On Mon, Jan 11, 2016 at 12:08 PM, Igwe Ogba  wrote:

>
>
> 
> Hello. I'm still a Clojure newbie and had a bit of code return what seems
> to be the wrong value.
>
>
>
> 
> After typing in (map inc [1 2 3 4]) I would expect to get [2 3 4 5].
> However my Clojure repl returns [1 2 3 4]. This is happening on windows.
> I've included a screenshot as well. Is this sort of behaviour (where the
> wrong answer appears) normal in Clojure and are there any implications for
> real time code?
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using map on multiple collections.

2009-12-29 Thread Nicolas Buduroi
Big thanks to everyone, the suggestions given are all very welcome,
even if I didn't really needed a better version as my use of mappad is
really simple for now. It was just curiosity on my part.

The lazy version by Heinz could be quite useful in other situations,
I've added it to my toolbox. Using lazy sequence with recursion is a
really elegant way to resolve most problems, it make up for the lack
of TCO in lots of cases. Also, the use of fnil is interesting. It
seems like a quite useful function, but it's a little bit confusing,
need more studying on that one. So to wrap up this post here's the
code for both lazy and non-lazy version of mappad:

(defn extend-tuple
  "Lazily creates tuples from given colls, filling the ones that are
  empty before the rest with the default value."
  [default & colls]
  (if (some (complement empty?) colls)
(cons
  (map (fn [l] (if (empty? l) default (first l))) colls)
  (lazy-seq (apply extend-tuple default (map next colls
nil))

(defn append-default
  "Returns the given colls padded with the given default value."
  [default & colls]
  (let [lengths (map count colls)
maxlen (apply max lengths)]
(map #(concat %1 (repeat (- maxlen %2) default)) colls lengths)))

(defn mappad
  "Like map but if collections aren't all of the same size, the
smaller
  ones are padded with the given default value."
  [f default & colls]
  (apply map f (apply append-default default colls)))

(defn lazy-mappad
  "Like mappad but lazy."
  [f default & colls]
  (map #(apply f %) (apply extend-tuple default colls)))

As you see, I renamed it extend-tuple as tupel was probably a typo
unless I'm mistaken. I'd like to find a better name, but these kind of
functions are always hard to name. I'll eventually release these and
other simple helpers in a small library where I keep these things. But
maybe one of these version (the lazy one at least) warrant being
included in clojure.contrib.seq-utils.  I'll open a ticket for it in
the Assembla page later this week.

Thanks again and happy new year!

- budu

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-28 Thread Heinz N. Gies

On Dec 27, 2009, at 22:33 , Meikel Brandmeyer wrote:

> Checking for nil here is independent on the contents of the lists. The `(map 
> seq lists)` first turns everything in lists into a seq. If a collection is 
> empty it will be turned into nil. This nil is independent of any contained 
> nil of any other collection at that point in the iteration. The second point 
> where nil shows up is fnil. first returns nil when it gets passed nil. We 
> have to modify it to return the default in that case. However the passed nil 
> is again from the seq itself not the  contents. So contained nils are not a 
> problem at all.
> 
> user=> (extend-tupel :x [1 nil 3] [4 5 6 7])
> ((1 4) (nil 5) (3 6) (:x 7))

Ah sorry, you're right, I misinterpreted fnil wrong :) so yes, that is really 
way nicer :) thanks for the hint to fnil too, so it seems not to be in the 
stable clojure yet :( too sad, but copy & paste from your link does :D.


Best regards,
Heinz

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-27 Thread Meikel Brandmeyer
Hi,

Am 27.12.2009 um 12:22 schrieb Heinz N. Gies:

>> (defn extend-tupel
>> [default & lists]
>> (lazy-seq
>>   (let [seqs (map seq lists)]
>> (when (some identity seqs)
>>   (cons (map (fnil first [default]) seqs) ; < Note previously 
>> missing brackets.
>> (apply extend-tupel default (map rest seqs)))
> 
> I didn't checked for nil but for empty? on purpose, nil might also be a value 
> in a list - I know it's will not be common but a list that has '(nil 1 2 3) 
> would become '( 1 2 3) if checking for nil and not empty.

Checking for nil here is independent on the contents of the lists. The `(map 
seq lists)` first turns everything in lists into a seq. If a collection is 
empty it will be turned into nil. This nil is independent of any contained nil 
of any other collection at that point in the iteration. The second point where 
nil shows up is fnil. first returns nil when it gets passed nil. We have to 
modify it to return the default in that case. However the passed nil is again 
from the seq itself not the  contents. So contained nils are not a problem at 
all.

user=> (extend-tupel :x [1 nil 3] [4 5 6 7])
((1 4) (nil 5) (3 6) (:x 7))

Note, there were some missing brackets in my code. I corrected the above quote.

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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-27 Thread Heinz N. Gies
On Dec 26, 2009, at 21:09 , Meikel Brandmeyer wrote:
> Here is a more idiomatic (and fully lazy) version using the fnil function 
> proposed by Rich here: 
> http://groups.google.com/group/clojure/msg/f251cfd9baab440a
> 
> (defn extend-tupel
>  [default & lists]
>  (lazy-seq
>(let [seqs (map seq lists)]
>  (when (some identity seqs)
>(cons (map (fnil first default) seqs)
>  (apply extend-tupel default (map rest seqs)))
> 
> Sincerely
> Meikel
> 
I didn't checked for nil but for empty? on purpose, nil might also be a value 
in a list - I know it's will not be common but a list that has '(nil 1 2 3) 
would become '( 1 2 3) if checking for nil and not empty. So your 
approach to wrap the lazy seq around it all is a good idea and makes the whole 
thing much nicer :).


Best Regards,
Heinz

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-26 Thread Meikel Brandmeyer
Hi,

Am 26.12.2009 um 14:45 schrieb Heinz N. Gies:

> 
> On Dec 26, 2009, at 2:37 , Nicolas Buduroi wrote:
> 
>> 
>> I'll have a look at this, it would certainly make this function more
>> idiomatic to Clojurians.
>> 
>> Thanks for the suggestion.
> 
> I've another one I like even better, it get's a bit away from mapping over n 
> list but it could achiev the same:
> 
> (defn extend-tupel [default & lists]
>   (if (some (complement empty?) lists)
> (cons
>   (map (fn [l] (if (empty? l) default (first l))) lists)
>   (lazy-seq (apply extend-tupel default (map next lists
> nil))
> 
> This takes a default value and N lists, then creates s tupels form this lists 
> untill all are empty, filling the ones that are empty before the rest with 
> the default value. You could use destruction in your map to make it look like 
> mapping over multiple lists. I like this better since each list will only 
> walked once, this is especially nicer in my eyes when it are lazy lists that 
> need to be evaluated each time the list is accessed.

Here is a more idiomatic (and fully lazy) version using the fnil function 
proposed by Rich here: 
http://groups.google.com/group/clojure/msg/f251cfd9baab440a

(defn extend-tupel
  [default & lists]
  (lazy-seq
(let [seqs (map seq lists)]
  (when (some identity seqs)
(cons (map (fnil first default) seqs)
  (apply extend-tupel default (map rest seqs)))

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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-26 Thread Daniel Werner
On Dec 23, 6:04 am, Nicolas Buduroi  wrote:
> Hi, today I needed to use the map function on multiple collections
> which didn't had all the same length. In this case, it returns a
> sequence of the size of smallest one. But the problem I was facing was
> required to map until the end of the longest, padding the smaller ones
> with a default value. I came up with this:
>
> (defn mappad [f val & colls]
>   (let [longest (apply max (map count colls))
>         colls   (map #(if (< (count %) longest)
>                         (concat % (repeat val))
>                         %) colls)]
>     (apply (partial map f) colls)))
>
> user> (mappad #(+ %1 %2 %3) 0 [1] [2 3] [4 5 6])
> (7 8 6)
>
> Is there a better way?

Another, rather radical approach is to re-implement map with intrinsic
padding support (obviously based on clojure.core/map):

(defn map-longest
  "Returns a lazy sequence consisting of the result of applying f to
the
  set of first items of each coll, followed by applying f to the set
  of second items in each coll, until *all* of the colls are
exhausted.
  Missing items in exhausted colls are replaced with pad. Function
  f should accept number-of-colls arguments."
  ([f pad coll]
(map f coll))
  ([f pad c1 c2]
   (lazy-seq
(let [s1 (seq c1) s2 (seq c2)]
  (when (or s1 s2)
(let [s1 (or s1 [pad])
  s2 (or s2 [pad])]
  (cons (f (first s1) (first s2))
(map-longest f pad (rest s1) (rest s2
  ([f pad c1 c2 c3]
   (lazy-seq
(let [s1 (seq c1) s2 (seq c2) s3 (seq c3)]
  (when (or s1 s2 s3)
(let [s1 (or s1 [pad])
  s2 (or s2 [pad])
  s3 (or s3 [pad])]
  (cons (f (first s1) (first s2) (first s3))
(map-longest f pad (rest s1) (rest s2) (rest
s3
  ([f pad c1 c2 c3 & colls]
   (let [step (fn step [cs]
 (lazy-seq
  (let [ss (map seq cs)]
(when (some identity ss)
  (let [ss (reduce #(conj %1 (or %2 [pad])) []
ss)]
(cons (map first ss) (step (map rest
ss]
 (map #(apply f %) (step (conj colls c3 c2 c1))

Of course, this solution results in lots of code duplication, looks
rather unwieldy and is less general than Heinz' solution. I'm curious:
Does it have any merits that could make its use worthwhile?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-26 Thread Heinz N. Gies

On Dec 26, 2009, at 2:37 , Nicolas Buduroi wrote:

> 
> I'll have a look at this, it would certainly make this function more
> idiomatic to Clojurians.
> 
> Thanks for the suggestion.

I've another one I like even better, it get's a bit away from mapping over n 
list but it could achiev the same:

(defn extend-tupel [default & lists]
  (if (some (complement empty?) lists)
(cons
  (map (fn [l] (if (empty? l) default (first l))) lists)
  (lazy-seq (apply extend-tupel default (map next lists
nil))

This takes a default value and N lists, then creates s tupels form this lists 
untill all are empty, filling the ones that are empty before the rest with the 
default value. You could use destruction in your map to make it look like 
mapping over multiple lists. I like this better since each list will only 
walked once, this is especially nicer in my eyes when it are lazy lists that 
need to be evaluated each time the list is accessed.


Best Regards,
Heinz

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Using map on multiple collections.

2009-12-25 Thread Nicolas Buduroi

On Dec 25, 9:08 am, "Heinz N. Gies"  wrote:
> On Dec 23, 2009, at 6:04 , Nicolas Buduroi wrote:
>
> > Hi, today I needed to use the map function on multiple collections
> > which didn't had all the same length. In this case, it returns a
> > sequence of the size of smallest one. But the problem I was facing was
> > required to map until the end of the longest, padding the smaller ones
> > with a default value. I came up with this:
>
> No code but an idea, calling length on the collection might force them to be 
> itterated entirely why not define something like a lazy seq that takes:
>
> 1) the sequence to extend
> 2) the default value
> 3) a number of other sets
>
> As long as any of the lists is not epty return either first or the default 
> value, this saves iterating through all lists, and is lazy :)
>
> A quick not tested and proably horribl wrong example:
>
> (defn extend-list [main-list default & other-lists]
>   (if (some #(not (empty? %)) other-lists)
>     (if
>       (cons
>          (empty? main-list) default (first main-list)) (apply extend-list 
> (next main-list) default (map next other-lists)
>
> (this is not tested and just an idea, sorry short in time!

I'll have a look at this, it would certainly make this function more
idiomatic to Clojurians.

Thanks for the suggestion.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-25 Thread Nicolas Buduroi
On Dec 25, 1:52 am, Tom Hicks  wrote:
> A slight modification, which I think avoids counting each collection
> twice:
>
> (defn append-val [val & colls]
>   (let [lengths (map count colls)
>         maxlen (apply max lengths)]
>     (map #(concat %1 (repeat (- maxlen %2) val)) colls lengths)
>   )
> )

Good one!

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-25 Thread Heinz N. Gies
On Dec 23, 2009, at 6:04 , Nicolas Buduroi wrote:

> Hi, today I needed to use the map function on multiple collections
> which didn't had all the same length. In this case, it returns a
> sequence of the size of smallest one. But the problem I was facing was
> required to map until the end of the longest, padding the smaller ones
> with a default value. I came up with this:

No code but an idea, calling length on the collection might force them to be 
itterated entirely why not define something like a lazy seq that takes:

1) the sequence to extend
2) the default value
3) a number of other sets

As long as any of the lists is not epty return either first or the default 
value, this saves iterating through all lists, and is lazy :)

A quick not tested and proably horribl wrong example:

(defn extend-list [main-list default & other-lists]
  (if (some #(not (empty? %)) other-lists)
(if 
  (cons 
 (empty? main-list) default (first main-list)) (apply extend-list (next 
main-list) default (map next other-lists)


(this is not tested and just an idea, sorry short in time!

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-24 Thread Tom Hicks
A slight modification, which I think avoids counting each collection
twice:

(defn append-val [val & colls]
  (let [lengths (map count colls)
maxlen (apply max lengths)]
(map #(concat %1 (repeat (- maxlen %2) val)) colls lengths)
  )
)


On Dec 23, 10:30 am, kyle smith  wrote:
> It's a little shorter if you unconditionally concat & repeat.
>
> (defn append-val [val & colls]
>   (let [maxlen (apply max (map count colls))]
>     (map #(concat % (repeat (- maxlen (count %)) val)) colls)))
>
> user> (apply map + (append-val 0 [1] [2 3] [4 5 6]))
> (7 8 6)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-23 Thread Nicolas Buduroi
On Dec 23, 12:30 pm, kyle smith  wrote:
> It's a little shorter if you unconditionally concat & repeat.
>
> (defn append-val [val & colls]
>   (let [maxlen (apply max (map count colls))]
>     (map #(concat % (repeat (- maxlen (count %)) val)) colls)))
>
> user> (apply map + (append-val 0 [1] [2 3] [4 5 6]))
> (7 8 6)

Thanks for the suggestion.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using map on multiple collections.

2009-12-23 Thread kyle smith
It's a little shorter if you unconditionally concat & repeat.

(defn append-val [val & colls]
  (let [maxlen (apply max (map count colls))]
(map #(concat % (repeat (- maxlen (count %)) val)) colls)))

user> (apply map + (append-val 0 [1] [2 3] [4 5 6]))
(7 8 6)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Using Map

2009-05-09 Thread Emeka
> From what you say I imagine you have something like a matrix
> or table, something with rows and columns that form cells.
> And you want to be able to grab the contents of one cell and move
> it around to another cell.
Andre, that statement captures all I intend to achieve.

This is what I wanted to do in clojure, have solver for a checker game. I
started off with the below codes.
(defstruct aount :h1 :h2 :h3 :h4)
(def row1 (ref  (struct aount "x" "x" "x" "x")))
(def row2 (ref  (struct aount "x" "x" "x" "x"))) ;;Till row ten.

In order to move a piece from one row to the other, I added.
(defn extract-num [sand key]
(let [n (Integer/parseInt (re-find #"\d+$" (name sand))) m (Integer/parseInt
(re-find #"\d+$" (name key)))]
(remake-row  n  m)))

;;I have not added the code to check if the intended space in occupied or
not.And it can only move diagonally in the left side.
(defn remake-row [i k]
(if (and (with-in-range i bin)(with-in-range k ban))
((eval(call-row  i))(call-key k))

(defn call-key [m]
(keyword (str "h"(inc m

(defn call-row [m]
 (symbol (str "row" (inc m

(defn with-in-range [m k]
 (and (>= (dec m) 0) (<= (inc m) k)))

I

A simple *move* involves sliding a piece one space diagonally forwards (also
diagonally backwards in the case of kings) to an adjacent unoccupied dark
square. A *jump* is a move from a square diagonally adjacent to one of the
opponent's pieces to an empty square immediately and directly on the
opposite side of the opponent's square, thus "jumping directly over" the
square containing the opponent's piece. An uncrowned piece can only jump
diagonally forwards, but a king can also jump diagonally backwards.
 For details check out this link http://en.wikipedia.org/wiki/Checkers.




Emeka

On Fri, May 8, 2009 at 11:05 PM, André Thieme
wrote:

>
> On 4 Mai, 17:01, Emeka  wrote:
> > Hello All,
> > I want to arrange objects in rows and also being able to manipulate them.
> By
> > manipulation I meant, I could move one object from one row and use it to
> > replace another object in another. Should I use Map or something else? I
> > need your opinions here
>
> From what you say I imagine you have something like a matrix
> or table, something with rows and columns that form cells.
> And you want to be able to grab the contents of one cell and move
> it around to another cell.
> I don't know how much that fits your plan. But if it is similar
> then one idea could be to have your objects being keys of a hashmap
> and let the values be vectors of two numbers: for the row and column.
> If you want to change the position of an object then you should dissoc
> it from its current [r c] (the key) and assoc it to its new [r c] key.
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Using Map

2009-05-08 Thread André Thieme

On 4 Mai, 17:01, Emeka  wrote:
> Hello All,
> I want to arrange objects in rows and also being able to manipulate them. By
> manipulation I meant, I could move one object from one row and use it to
> replace another object in another. Should I use Map or something else? I
> need your opinions here

>From what you say I imagine you have something like a matrix
or table, something with rows and columns that form cells.
And you want to be able to grab the contents of one cell and move
it around to another cell.
I don't know how much that fits your plan. But if it is similar
then one idea could be to have your objects being keys of a hashmap
and let the values be vectors of two numbers: for the row and column.
If you want to change the position of an object then you should dissoc
it from its current [r c] (the key) and assoc it to its new [r c] key.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Using Map

2009-05-08 Thread Stephen C. Gilardi


On May 8, 2009, at 6:40 PM, James Reeves wrote:


Perhaps you could explain in more detail what you intend to do and
why? As Luke says, a "row" suggests a vector, rather than a map, but
it's difficult to say for sure without knowing what you are trying to
achieve.


I'm interested in Emeka's answer to your question as well, but it  
occurs to me that if one is thinking in a database context, column  
names can be keys and rows can be maps or struct-maps mapping those  
keys to a group of values.


--Steve



smime.p7s
Description: S/MIME cryptographic signature


Re: Using Map

2009-05-08 Thread James Reeves

On May 8, 8:40 pm, Emeka  wrote:
> Luke
> I was referring to map the data structure. I later decided to use struct
> which is a map. I intend to manipulate elements of each row.
>
> Emeka

Perhaps you could explain in more detail what you intend to do and
why? As Luke says, a "row" suggests a vector, rather than a map, but
it's difficult to say for sure without knowing what you are trying to
achieve.

- James
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Using Map

2009-05-08 Thread Emeka
Luke
I was referring to map the data structure. I later decided to use struct
which is a map. I intend to manipulate elements of each row.

Emeka

On Fri, May 8, 2009 at 6:17 PM, Luke VanderHart
wrote:

>
> Do you mean map the function or map the data structure?
>
> If the most natural form of your data is truly "rows", you're probably
> best off using a vector data structure. As for which function you use,
> that depends whether you're doing something to every element or only
> to specific elements, and if you know which position those elements
> are in or if you have to search for them, etc.
>
> On May 4, 11:01 am, Emeka  wrote:
> > Hello All,
> > I want to arrange objects in rows and also being able to manipulate them.
> By
> > manipulation I meant, I could move one object from one row and use it to
> > replace another object in another. Should I use Map or something else? I
> > need your opinions here
> >
> > Regards,
> > Emeka
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: Using Map

2009-05-08 Thread Luke VanderHart

Do you mean map the function or map the data structure?

If the most natural form of your data is truly "rows", you're probably
best off using a vector data structure. As for which function you use,
that depends whether you're doing something to every element or only
to specific elements, and if you know which position those elements
are in or if you have to search for them, etc.

On May 4, 11:01 am, Emeka  wrote:
> Hello All,
> I want to arrange objects in rows and also being able to manipulate them. By
> manipulation I meant, I could move one object from one row and use it to
> replace another object in another. Should I use Map or something else? I
> need your opinions here
>
> Regards,
> Emeka
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---