All documentation I've seen about clojure assumes knowledge of lisp
which I dont have.
--~--~-~--~~~---~--~~
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
All documentation I've seen about clojure assumes knowledge of lisp
which I dont have.
--~--~-~--~~~---~--~~
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
swank-clojure is deprecated, don't use it. Instead start swank from
leiningen.
I found these instructions how to install clojure support in emacs
http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html
No need to use elpa with broken packages or starter-kit.
Maris
On Mar 24, 8:14 am, Tass
Is it possible to use list comprehension to generate a set ?
For example in scala I can do:
for (i <- (2 to 8).toSet[Int]) yield p(i)
In clojure this
(for [ x (set (range 4))] (* 4 x))
generates a list.
--
You received this message because you are subscribed to the Google
Groups "Clojure" gr
> Does this actually yield a set in Scala?
yes, it does
> What is p()? A set constructor?
p(i) reads i-nth element from a vector
def selectRow(p: Vector[Int], i: Int) = {
for (i <- (i - i % 9 to i - i % 9 + 8).toSet[Int]) yield p(i)
}
--
You received this message because you are subscri
> (set (for [x (range 4)] (* 4 x)))
> ;=> #{0 4 8 12}
>
> Does that help?
yes, thank you.
--
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
STM is discussed in this book
The Art of Multiprocessor Programming
http://www.amazon.com/Art-Multiprocessor-Programming-Maurice-Herlihy/dp/0123705916
On May 18, 8:25 am, jaime wrote:
> Hi All,
>
> I have interest in the implementation of STM, anyone who can suggest
> where I can start to find
To find first defined Option in scala I do this:
sol.find(_.isDefined).getOrElse(None)
I managed to do the same in clojure:
(some #(if (nil? %) false %) sol)
Is there a better way ?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
there is find-first in contrib
(find-first #(not (nil? %)) sol)
On May 27, 3:12 pm, Meikel Brandmeyer wrote:
> Hi,
>
> Am Freitag, 27. Mai 2011 15:56:47 UTC+2 schrieb MarisO:
>
>
>
> > To find first defined Option in scala I do this:
>
> > sol.find(_.i
(defn fac [n] (if (= n 1) 1 (* n fac (- n 1
your code tries to multiply n by function
this is correct:
(defn fac [n] (if (= n 1) 1 (* n (fac (- n 1)
On Aug 2, 8:11 am, recurve7 wrote:
> In browsing this group I see this topic has been brought up several
> times over the past 3 years
Do you know of any trick to reverse a sequence without reverse or
rseq ?
I wrote it like this:
((fn rev
([s] (rev '() s))
([r s] (if (seq s) (rev (cons (first s) r) (rest s)) r )) )
'[1 2 3 5] )
https://gist.github.com/1132357
I wonder if it can be written more shortly.
--
You recei
I would like to try pvmap and pvreduce.
Do I need to build par branch of Clojure ?
Is there any way I can make leiningen to use it ?
Maris
--
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
use this script to download everything you need for clojure
development on emacs (aquamacs)
git clone https://github.com/technomancy/clojure-mode.git
wget -P framemove http://www.emacswiki.org/emacs/download/framemove.el
wget -P paredit http://mumble.net/~campbell/emacs/paredit.el
wget --no-check
run this script in your .emacs.d directory
--
#!/bin/sh
git clone https://github.com/technomancy/clojure-mode.git
wget -P paredit http://mumble.net/~campbell/emacs/paredit.el
wget
http://download.savannah.gnu.org/releases/color-theme/color-the
14 matches
Mail list logo