of the other positions on our
site, send an email to j...@sonian.net with your resumé.
--
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
Hey guys,
I'm the CTO of ActionX, where we've built much of our infrastructure in
Clojure*. We're hiring. If you're in the NYC area and would like to work as
part of an interestingly-eclectic group of programmers, please take a look
at the position description below and get in touch if you're
Frequently I want to use the thread macros (- or -) except I need
to thread the arguments into positions other than the first and the
last. Or sometimes I have to go back and forth between first and last
positions. Instead of alternating between - and - and creating
nesting, I've been using
Here is an example of using this:
(-- hello world (.toUpperCase _) (.toLowerCase _) (.indexOf _ w))
On Tue, Jul 5, 2011 at 3:50 PM, Asim Jalis asimja...@gmail.com wrote:
Frequently I want to use the thread macros (- or -) except I need
to thread the arguments into positions other than
this:
(-- hello world (.toUpperCase _) (.toLowerCase _) (.indexOf _ w))
On Tue, Jul 5, 2011 at 3:50 PM, Asim Jalis asimja...@gmail.com wrote:
Frequently I want to use the thread macros (- or -) except I need
to thread the arguments into positions other than the first and the
last. Or sometimes I
On Tue, Jul 5, 2011 at 4:14 PM, Asim Jalis asimja...@gmail.com wrote:
Here is an example of using this:
(-- hello world (.toUpperCase _) (.toLowerCase _) (.indexOf _ w))
BTW, that's not a very compelling example since you can already do:
(- hello world! .toUpperCase .toLowerCase (.indexOf w))
ORIGINAL
(defn update-positions [snake apple]
(dosync
(if (eats? @snake @apple)
(do (ref-set apple (create-apple))
(alter snake move :grow))
(alter snake move)))
nil)
WITHOUT do
(defn update-positions [snake apple]
(dosync
(if (eats? @snake @apple)
((ref
Hi,
On Aug 5, 4:18 pm, michele michelemen...@gmail.com wrote:
ORIGINAL
(defn update-positions [snake apple]
(dosync
(if (eats? @snake @apple)
(do (ref-set apple (create-apple))
(alter snake move :grow))
(alter snake move)))
nil)
WITHOUT do
(defn update
ORIGINAL
(defn update-positions [snake apple]
(dosync
(if (eats? @snake @apple)
(do (ref-set apple (create-apple))
(alter snake move :grow))
(alter snake move)))
nil)
WITHOUT do
(defn update-positions [snake apple]
(dosync
(if (eats? @snake @apple
2010/8/5 michele michelemen...@gmail.com
ORIGINAL
(defn update-positions [snake apple]
(dosync
(if (eats? @snake @apple)
(do (ref-set apple (create-apple))
(alter snake move :grow))
(alter snake move)))
nil)
WITHOUT do
(defn update-positions [snake apple
Adding to what Meikel said:
A warning sign that the latter version is incorrect is the double open parens:
((ref-set ... Double open parens are fairly rare in Clojure code.
Stu
Hi,
On Aug 5, 4:18 pm, michele michelemen...@gmail.com wrote:
ORIGINAL
(defn update-positions [snake apple
More specifically Developer positions with a major Clojure focus at
our Durham, NC, USA office. Relevance is also doing a lot of Ruby,
plus some C, Java, and a smattering of other things.
Learn more about Relevance at http://howwework.thinkrelevance.com/. If
you are interested tell us about
On Sun, Nov 22, 2009 at 7:54 AM, Emeka emekami...@gmail.com wrote:
John,
You should have added that you code came from Programming Clojure.
It didn't. If it's the same as, or closely similar to, code from there, it's
entirely coincidental.
In Clojure there's usually several ways to do
Thanks Emeka, I took a look at it. I still say it would be nice to
organize the sequence functions (somehow).
--
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
My 'requirements' were not so much for any particular need, but to try
to think up a logical and complete API for dealing with multisets. I
agree that there should be an actual collection type for multisets
(implemented as an underlying map of values to frequencies I presume);
but you might as
If you think about it, the tower of sequence types is like this:
seq
|
gathered seq
/\
multiset permutation
\ /
set
The way to do the various options I pointed out is to mix types: the
Thanks Sean, I'll do the exercise. I don't know how I missed it in
seq-utils.
After months of programming Clojure, I realize how much I still
have to learn.
(Knowledge is power; knowledge of lack of knowledge is power to
power.)
Nick.
--
You received this message because you are
the macro w/ the same name.
Another choice is to use built-in functions, like this:
(defn positions [pred coll]
(map second
(filter (comp pred first)
(map vector coll (iterate inc 0)
(defn indexed [coll]
(map vector (iterate inc 0) coll))
(defn positions [pred coll]
(for [[i e
While we're on the topic, where is something like (subtract [1 2 3 3 4
4 5 6] evens) - (1 3 3 5)? Doesn't seem to be in seq-utils or API.
Seems like there should be a parallel multiset library for colls, to
clojure.set. (I guess there could be two versions of subtract, one
that removes \all, and
On 20 Lis, 01:49, nchubrich nicholas.chubr...@gmail.com wrote:
While we're on the topic, where is something like (subtract [1 2 3 3 4
4 5 6] evens) - (1 3 3 5)? Doesn't seem to be in seq-utils or API.
Seems like there should be a parallel multiset library for colls, to
clojure.set. (I guess
ajuc wrote:
On 20 Lis, 01:49, nchubrich nicholas.chubr...@gmail.com wrote:
While we're on the topic, where is something like (subtract [1 2 3 3 4
4 5 6] evens) - (1 3 3 5)? Doesn't seem to be in seq-utils or API.
Seems like there should be a parallel multiset library for colls, to
Yeah, remove will work for one kind of 'multiset' operator I am
thinking of. The others might as well preserve as much order as
possible. For instance, (add [1 2 3 4] [1 2 3 4]) could have two
interpretations; you just append, or you add like elements to
positions of like elements, so you get [1
:
Yeah, remove will work for one kind of 'multiset' operator I am
thinking of. The others might as well preserve as much order as
possible. For instance, (add [1 2 3 4] [1 2 3 4]) could have two
interpretations; you just append, or you add like elements to
positions of like elements, so you
On Thu, Nov 19, 2009 at 7:00 PM, Sean Devlin francoisdev...@gmail.comwrote:
That's why there are two separate functions do do what you suggest
user=(interleave [1 2 3 4] [1 2 3 4])
(1 1 2 2 3 3 4 4)
user= (concat [1 2 3 4] [1 2 3 4])
(1 2 3 4 1 2 3 4)
Poor choice of example. I think he
John Harrop wrote:
On Thu, Nov 19, 2009 at 7:00 PM, Sean Devlin francoisdev...@gmail.com
mailto:francoisdev...@gmail.com wrote:
That's why there are two separate functions do do what you suggest
user=(interleave [1 2 3 4] [1 2 3 4])
(1 1 2 2 3 3 4 4)
user= (concat [1 2
On Thu, Nov 19, 2009 at 7:15 PM, Alex Osborne a...@meshy.org wrote:
John Harrop wrote:
On Thu, Nov 19, 2009 at 7:00 PM, Sean Devlin francoisdev...@gmail.com
mailto:francoisdev...@gmail.com wrote:
That's why there are two separate functions do do what you suggest
. What happens if same elements aren't grouped
together in the first input coll it, it just arbitrarily picks one of
their positions and moves them all together there? :-)
If you're going to go to the trouble of making special multiset
functions you may as well create a new multiset collection type
a pretty weird set of requirements. Usually a
multiset/bag is unordered. What happens if same elements aren't grouped
together in the first input coll it, it just arbitrarily picks one of
their positions and moves them all together there? :-)
If you're going to go to the trouble of making special
to
be
preserved, though. Sort wouldn't do that.
Hmmm.. that's a pretty weird set of requirements. Usually a
multiset/bag is unordered. What happens if same elements aren't
grouped
together in the first input coll it, it just arbitrarily picks one of
their positions and moves them all together
29 matches
Mail list logo