ng results.
(Hi all, I'm new to Clojure and this is my first email here ... sorry
if this has already been discussed elsewhere)
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" gro
would be a way to
provide doc strings for each method implementation as well, but that
seems trickier to fit in the current framework.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" gr
ave a one-click
wordpress install. I'm not sure how best to post code, but for now
simple seems to work OK.
-Jason
On Dec 16, 11:05 am, Randall R Schulz wrote:
> Hi,
>
> Wordy though I am, I've never done any blogging before, but now that I'm
> finally beginning to get up
reasonably priced in that department. Anyway, I'm not there yet.
> htmlize.el works like a dream:http://www.emacswiki.org/emacs/Htmlize
Thanks for the tip; I'll definitely check that out. I'd imagine you
could paste the generated HTML directly into a wordpress post; have
you
Thanks all. The patch looks interesting to me, although I'd only use
it if it was integrated into the main build.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to t
umber of seqs must be known at compile-time
(correct?). Perhaps most useful would be a function that takes a lazy
seq of lazy seqs, and returns their supremely lazy concatenation.
Thanks!
Jason
--~--~-~--~~~---~--~~
You received this message because you are subscrib
ed
to explain that the first coll is always "needed" right away. If so,
I'm also curious why this is the case.
Thanks,
Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" gro
1 ; now as
expected
; Out of memory
Thanks,
Jason
--~--~-~--~~~---~--~~
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 unsubscrib
ndom*)]
(if (< x max-val)
x
(recur))
#'user/my-rand-int
user> (my-rand-int
123134202193481203941234192384712938471239841237489123481234812304902349820394812304213481203498)
87828784102811276246738863788257270796166300292074486
"
[n] (int (rand n)))
and it looks like (int x) rounds x as I've described:
user> (int 139872398412937841234)
-451786158
user> (int 12938471928347198.12312)
2147483647
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subsc
valuate the concat call until actually needed. Note that
the result of delay-seq is a seq-able collection, and no corresponding
force call is ever needed.
[1] http://w01fe.com/?attachment_id=48
Comments about this are very welcome; this was my first voyage into
the internals of Clojure, and I still have l
(hash-map [1 2] nil) '(1 2))
false
1:5 user=> (contains? (array-map [1 2] nil) '(1 2))
true
As far as I can figure all five of these should return true (the
exception is particularly weird). Am I missing something here?
Thanks, Jason
--~--~-~--~~~---~--~---
end = end + s.start;
} else {
this.v = v;
this.start = start;
this.end = end;
}
}
I've tested this a bit and it appears to work properly. Does this
seem like a good idea?
-Jason
--~--~-~--~~---
> I believe the exception is expected here due to the implementation of
> sorted sets. See this thread for explanation of a similar exception
> thrown by a sorted
> map:http://groups.google.com/group/clojure/browse_frm/thread/34def2ec6342...
OK, that part makes sense to me, tha
ods for Clojure vectors and lists:
user> (.equals [1 2] '(1 2))
true
user> (list (.hashCode [1 2]) (.hashCode '(1 2)))
(994 -1919631597)
Cheers, Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&quo
in Aquamacs try coping the code on the ELPA install page and then
eval'ing with C-x-e
(hold down control key, then type x key and then e key)
On Dec 1, 2:30 pm, Charras wrote:
> David;
>
> My problem is that I haven't been able to install the clojure-mode.
> What I read is that this is done usin
hi I have a small problem.. I want to execute a java init function
just once for a scheduler. I have tried defonce and def to do this,
this gets the work done but which is the best way to do it. What i
actually want is run the function once when the jvm starts up problem
with defonce i actually nee
thanks i'll try it :)
On May 18, 8:28 pm, Ken Wesson wrote:
> On Wed, May 18, 2011 at 10:09 AM, Jason wrote:
> > hi I have a small problem.. I want to execute a java init function
> > just once for a scheduler. I have tried defonce and def to do this,
> > this gets
you can try the following link https://github.com/hsenid-mobile/clj-vaadin it
is a Clojure wrapper written for Vaadin. It's still in its initial stage :)
You can check the implantation.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to thi
Hi All
I just moved to Singapore and I'm looking for a Clojure Group which i can
join. Anyone know any?
--
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 ar
Hi Zehua
Thank you for the reply. I just joined the group.
Cheers,
Jason
--
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 -
How about
(%->
starting-value
(foo 3 %)
(bar % arg2 arg3))
This combines the standard shorthand argument form from the inline
function with the threading. I also like be because the '%' stands
out.
On Feb 4, 3:05 pm, B Smith-Mannschott wrote:
> Clojure's threading macros -> a
truefalse true
If it's really by design to violate the Java .hashCode contract, I'd
be very interested in hearing why.
Cheers,
Jason
[1] http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode()
[2] http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html#has
em,
just something that users should be aware of. Perhaps one of the
pages on the website (Java interop / data structures?) should mention
this?
Cheers, Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
their nesting level
and periodically flatten themselves so that sequences of add and
subvec operations have amortized O(1) time (and use constant memory).
I'm not sure if that's even possible though; Clojure has been my first
real experience with immutable data structures. Thoughts?
Cheer
served by PersistentQueues, I
don't know. Still, it seems like if vectors could be made more
efficient, it couldn't hurt.
Thanks,
Jason
>
>
> --Chouser
>
> >
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
extracted. With either workaround, the built-in seq functions are no
longer directly applicable. I can't call filter directly on an mstk,
for example.
This isn't a big deal, I was mostly just curious why the seq
abstraction was set
)),
prev (aget arr i)]
(aset arr i (aget arr r))
(aset arr r prev)))
(seq arr)))
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to thi
ark")]) {:greet
"hello" :farewell "goodbye"})
{:farewell "goodbye Mark", :greet "hello Mark"}
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure&
": Got " '~form " as " (cons '~(first form)
(list ~@(rest
form)
(I have more too, but these are the ones I use most frequently.)
Comments/criticisms welcome. Also, many of these are placeholders for
more efficient versions, which I
he (reduce (fn [m [k v]] (assoc m k (f v))) {} m) type idioms
they replace are much more difficult to read than calls to the
utilities IMO.
Cheers,
Jason
map-map
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clo
ne?
Or, even better, might it be possible to replace the (gensym?) numbers
following anonymous functions with something more meaningful, like
fn__ where a is the first function on the line, going
from inside-out and then left-to-right?
[1] http://www.yourkit.com/eap/inde
your point that having more
standardized utilities just means that nobody will ever know them all
well.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send emai
map k v)) (concat
deposits withdrawls)))
which is considerably uglier and less clear IMO. Any chance of
changing merge-with in this way?
(Note this is actually similar to clojure.set union/intersection/
difference, which only require that the first e
ut, I agree; the seq/coll distinction can be very confusing at first,
especially when faced with seemingly contradictory outputs like
user> (= '(1) [1])
true
user> (= '() [])
false
user> {'(1) true}
{(1) true}
user> (get *1 [1])
true
user&g
>>> user> (= '(1) [1])
>>> true
>>
>>> user> (= '() [])
>>> false
>>
>> Hm. That does seem rather odd.
>
> Fixed - svn 1208.
Oh, I always assumed this was intentional ... I guess I never tried
switching the order of arguments. Well, that makes a bit more sense
then :).
--~--~-~
but for, e.g., Doubles and Integers it may only happen at a
single number (if at all).)
-Jason
[1]
http://groups.google.com/group/clojure/browse_thread/thread/5d11bc0da25a7ecc/06d6cd888a516119?hl=en&lnk=gst&q=.hashcode#06d6cd888a516119
[2]
http://code.google.com/p/c
, then which value would you use (if two values are my-equal but
>> not =)?
>
> Oh. Good point. I guess I was thinking it would be like
> 'merge-with', but if the conflict resolution function returned nil or
> false, you'd get back a nil instead of a map.
Hmmm, but so
lding up a
> bit of a language for whatever problem I'm tackling. (There's the
> schemaniac in me again.) There's a golden mean between complexity and
> clarity. At first glance, Jason's suggestions seem close to that mean
> to me, and I really like what he's done
true
and
user=> (map #(contains? (hash-set [1 2]) %) '((1 2) [1 2]))
(true true)
Woohoo, thanks Rich!
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group
Update: Rich just fixed this in http://code.google.com/p/
clojure/issues/detail?id=37&colspec=ID%20Type%20Status%20Priority
%20Reporter%20Owner%20Summary">svn 1215 .
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
On Jan 14, 6:01 pm, Jason Wolfe wrote:
> I've already posted here [1] and on the issue board [2] about
> hashing. In particular, .hashCode for seqs/colls break the Java
> contract that whenever (.equals x y), (= (.hashCode x) (.hashCode
> y)). (let x = [1] and y = (se
nt to (replicate (count (remove pred s))
nil).
Also, can I do anything to help implement/integrate the changes we've
agreed upon thus far?
Thanks, Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cl
ers.
>
> Rich
I like this a lot. Any chance of getting the same treatment for
unquote-splicing?
user> '~x
(clojure.core/unquote x)
user> '~...@x
; Exception: can't embed object in code
; Desired output: (clojure.core/
On Jan 14, 1:03 pm, Jason Wolfe wrote:
> > > (import '(java.util HashSet))
> > > (defn distinct-elts? "Are all of the elements of this sequence
> > > distinct? Works on infinite sequences with repititions, making it
> > > useful for, e.g., detecting
s"
[6000]
I'm at a total loss for what's going on. Anyway, I'll stop here for
now in case I'm missing something stupid or obvious.
Thanks for your help!
Jason
--~--~-~--~~~---~--~~
You received this message because you are su
> SVN 1216 - thanks for the report.
Thanks for the quick fix!
-Jason
--~--~-~--~~~---~--~~
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
T
> > > (defn maximal-elements [f s]
> > > "Return a seq of elements of s maximizing (f elt)."
> > > (when (seq s)
> > > (loop [max-elts (first s),
> > > max-val (f (first s)),
> > > rest-elts (rest s)]
> > > (if (empty? rest-elts)
> > > max-elts
> > > (
weet, thanks Meikel! Rich, what do you think about integrating this
into the trunk?
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegrou
hers think about this?
Thanks,
Jason
--~--~-~--~~~---~--~~
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
h this and safe-get up by
more than a factor of 4! [2]
[2] http://w01fe.com/blog/2009/01/more-on-clojure-map-accessor-speeds/
Also, once again (Chouser?), is there anything I can do to help
implement the changes we've talked about? I can try to make patches
for the changes in c
ess in the mean-time I could use symbols instead of keywords for
my class types. However, I assume that would slow things down
substantially (unless method caching would take care of this; I'll
have to check on that.)
-Jason
On Jan 19, 7:49 pm, David Nolen wrote:
> My OO example from earli
> I'm sorry, Jason, I really thought I answered this the first time you
> asked. But I can't find any such answer in the archives, so I must
> have been mistaken.
No worries, thanks for all your help with this.
>> I can try to make patches for the changes in co
lojure maps implement Java.util.Map, and
thus should be using .equals for equality (as they are now). I still
might like variants of maps that use identical? or =, but not as the
default.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are sub
could argue that the user should know how the operations work and put
the arguments in the right (fast) order -- but sometimes, that
information will only be known at runtime. Overall, the possibility
of a big O improvement for a small constant penalty seems worth it to
me.
Qu
ence "Like difference, but faster." [s1 s2]
(if (or (not (set? s2))
(> (int (count s1)) (int (count s2
(clojure.set/difference s1 s2)
(difference2 s1 s2)))
-Jason
--~--~-~--~~~---~--~~
You received this message because you are s
I
think Chouser was referring above) was about issues for Clojure core,
and whether or not an explicit sign-off from you was desired before
they are posted there. This came up in this thread since after
discussing with Chouser, several of my utilities seemed better-suited
as changes/a
apsed time: 20444.035 msecs" ; (clojure.set/union small big)
"Elapsed time: 0.956 msecs" ; (clojure.set/union big small)
"Elapsed time: 2.906 msecs" ; (fast-union small big)
"Elapsed time: 2.826 msecs" ; (fast-union b
ionality. Will you accept issues for any of these?
Thanks,
Jason
--~--~-~--~~~---~--~~
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
On Jan 20, 4:44 pm, Jason Wolfe wrote:
> Apologies for multiple posts; I will try to thoroughly investigate
> things before starting posting next time. Anyway, to round out the
> thread, here are corresponding results for intersection and union:
Well, that didn't last too long .
possible values
for each variable. If there are no variables, this set should consist
of the single "empty binding" rather than "no bindings possible".
Will anyone sign off on adding this as a clojure.contrib issue?
Thanks,
Jason
--~--~-~--~~~-
yours but
also things like (random-element (maximal-elements ...)).
-Jason
On Jan 21, 8:09 pm, Vincent Foley wrote:
> A couple months ago, there was a discussion in this group about the
> functions max and min and making them work with data types other than
> numbers. I was toying ar
4c77f5babf?hl=en&lnk=gst&q=struct#e8e2a14c77f5babf
http://groups.google.com/group/clojure/browse_thread/thread/74d430f8e4353725/cc8ad0b22adf60cc?hl=en&lnk=gst&q=struct#cc8ad0b22adf60cc
-Jason
On Jan 21, 10:48 pm, Mark Engelberg wrote:
> Is there any way to determine whether so
rsistentStructMap x )
although this is probably not recommended and subject to change at any
time.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email t
n, and I'm not sure if this is
the most idiomatic way to do things currently.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure
eral as it will also work
with multi-sets):
(defn power-set
"Returns a lazy seq of possible subvectors of seq s."
[s]
(loop [s (seq s), sets [[]]]
(if s
(recur (rest s) (lazy-cat sets (map #(conj % (first s))
sets)))
sets)))
user> (power-set '(1 1))
([] [1
re which type).
Or, you could just look at Wiki: "the power set of the empty set is
the set containing the empty set"
http://en.wikipedia.org/wiki/Power_set
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Go
t other))
total))
0 more))
#'user/sum
user> (sum [1 2 3 4])
10
(of course, sum could also be defined as just (apply + more) or
(reduce + more)).
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
empty seq.
Anyone willing to sign off??
On Jan 21, 5:34 pm, Jason Wolfe wrote:
> I just got bit by (clojure.contrib.lazy-seqs/combinations) returning
> nil, not [[]] as I expected. I could see arguments for either being
> the "correct" output, but let me give my case for [[]]
> this.
Yes, exactly :) Returning nil for no-args was "hacked on" in a sense,
in that the loop would have naturally done the "right thing" otherwise.
Issue here: http://code.google.com/p/clojure-contrib/issues/detail?id=6
Thanks,
Jason
--~--~-~--~~
On Jan 19, 4:29 pm, Jason Wolfe wrote:
> I've been doing some OO-type Clojure programming, and have run into
> the following (quite minor) annoyance:
>
> I've defined a struct with a :class of ::Foo in namespace
> my.long.namespace.foo.
>
> In another namespace m
OK, if these are not wanted in core right now, will anyone sign off
for adding them to clojure.contrib?
I can't say I like the idea of having two sets of functions that do
exactly the same thing, but ... sometimes you just don't want things
to run ~1000 times slower than they shoul
And Rich Hickey writes:
> You can use the logo on the wikipedia article on Clojure, but only if
> you spell my name correctly :)
May I use the logo for the identi.ca group? ( http://identi.ca/group/clj )
Jason
--~--~-~--~~~---~--~~
You received this m
>
> On Fri, Jan 23, 2009 at 12:23 PM, Jason Wolfe
> wrote:
>>
>> OK, if these are not wanted in core right now, will anyone sign off
>> for adding them to clojure.contrib?
>>
>
> Well, *I* want these changes you've proposed in the core, but of
>
o it
sped the whole application up by about 100 times. Definitely worth
doing if you can!
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@
Every clojure function returns a value. Even if it is only used for
side effects, it still has to return something (probably nil).
-Jason
On Jan 23, 12:17 pm, wubbie wrote:
> Is every function supposed to return something?
> Of course, except for pure side-effects.
>
> -sun
>
ot= [1 2 3] [2 3 4])
>
> No.
>
> - allow arguments to merge-with after the first to be lists of
> pairs.
>
> No.
OK, thanks.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure"
> Hi Jason,
>
> Thanks very much for all your recent thought, work, and postings.
>
> I think it makes sense for clojure-contrib to be much more agile in
> accepting new, experimental, and incrementally improved code than
> Clojure proper. Things in contrib are always o
for this would be welcome.
Finally, I don't know how to make a patch, and found nothing in a
quick search of the wiki/newsgroup/website. I heard "Git" floating
around somewhere earlier; am I to check out the SVN with git-svn and
make a patch that way?
-Jason
--~--~-~-
On Jan 24, 2009, at 6:01 PM, Stephen C. Gilardi wrote:
> On Jan 24, 2009, at 8:11 PM, Jason Wolfe wrote:
>> Finally, I don't know how to make a patch, and found nothing in a
>> quick search of the wiki/newsgroup/website. I heard "Git" floating
>> around some
OK, cartesian_product it is.
Two comments on your version. First, unlike mine (and the current
"combinations"), it takes a single argument, a seq of seqs (rather
than multiple seq arguments); which of these ways is preferred?
Second, I had the clauses of my for loop backwards, which was slowing
CDEFG"]
>
> and let me know if you also see the 2x performance difference.
Yes, yours runs more than 2x faster on this input. On the other hand,
mine runs almost 2x faster on
(range 3000) (range 3000) ... As far as I can tell, yours is faster
when there are a large number of inp
> Also, it's worth pointing out that your newer version prints the
> combinations out in a non-standard order.
Good point ... I shouldn't have tried to avoid adding the "let":
(defn combinations "Take a seq of seqs and return a lazy list of
ordered combinations (pick 1 from each seq)"
[seq
usly.
Ah, I noticed the unpredictable timings too but didn't make that
connection -- thanks. OK, I'm happy to go with your version then :)
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cl
ive" versions of things
I've seen floating around.
-Jason
--~--~-~--~~~---~--~~
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 unsub
> +1 from me, for what it's worth.
Ditto. Every time I want replicate, I type "repeat", remember that it
only takes 1 arg, and then have to search for "replicate" because the
name just won't stick in my head.
-Jason
--~--~-~--~~~-
and not a promise of the interface".
-Jason
On Jan 29, 6:42 am, ntu...@googlemail.com wrote:
> If its left argument is nil, "intersection" throws a NPE (Clojure rev. 1235):
>
> user=> (set/intersection nil #{1})
> java.lang.NullPointerException (NO_SOUR
up with. They will be a bit slower than
"reduce"ing with the current ones (50% or so) when passed several tiny
(i.e., 1-element) sets due to the overhead of extracting the big/small
element, but as you can see, can be much much faster when there are
both big and small sets involved.
-J
> In that case, it makes me think of the degenerate example (I realize
> this is slightly stupid):
>
> (some #{false} (list false))
Maybe this is an argument for adding "any?" to the list of core
functions?
-Jason
--~--~-~--~~~---~--~~
You
except (.contains nil 2) ==> NPE
:-)
-Jason
On Jan 29, 2009, at 3:55 PM, Kevin Downey wrote:
> actually rhickey showed up on irc and pointed something out:
>
> 15:23 rhickey : user=> (.contains [1 2 3] 2)
> 15:23 rhickey : true
> 15:23 rhickey : user=> (.conta
whether to return an Object representing a non-empty seq, or nil, even
if you never explicitly ask for any of the elements of the returned
seq. This means evaluating each of its arguments in turn until it
finds an argument x for which (seq x) is non-nil.
HTH,
Jason
On Jan 30, 3:55 pm, André Thi
sed to it.
Hmm, I don't think this is it. For instance,
(take 0 (lazy-cons (prn "asdf") nil))
prints nothing. (Lazy-cons doesn't need to evaluate things up-front
like lazy-cat, since lazy-cons always returns a (non-empty) seq with
at least one element).
-Jason
--~--~---
ins? s "test"))
false
user> (let [s (HashSet.)] (.add s "test") (contains? (set s) "test"))
true
Bug or desired behavior?
Thanks,
Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
ets, it makes sense to always iterate through
the smaller argument. This makes a huge speed difference when you
have one small set and one big set, as you can see in the timings I
included.
-Jason
--~--~-~--~~~---~--~~
You received this message because yo
maller than the other
(s).
- Works on any number of arguments (including 0/1).
-Jason
[1]
http://groups.google.com/group/clojure/browse_thread/thread/b35ca9035762e1a4?hl=en#
On Jan 31, 5:56 pm, Mark Volkmann wrote:
> What's the difference between into and clojure.set/union? While their
output of for, so they'll
be equivalent).
-Jason
--~--~-~--~~~---~--~~
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 gro
ot;key" and the value with "second" or "val", although the latter
options will tend to be much faster.
You can also destructure:
(some (fn [[k v]] (= k v)) {:a 2 :b :b})
==> true
-Jason
--~--~-~--~~~---~--~~
You received this message
icitly call seq on them first):
user> (into [4] (.toArray [1 2 3]))
[4 1 2 3]
user> (into (.toArray [1 2 3]) [4])
; ClassCastException
user> (into (seq (.toArray [1 2 3])) [4])
(4 1 2 3)
-Jason
--~--~-~--~~~---~--~~
You received this message because you are
On Jan 31, 7:09 pm, wubbie wrote:
> Hi,
>
> I saw in ants.clj a notation (->).
> what is it?
> For example,
> (defn place [[x y]]
> (-> world (nth x) (nth y)))
Did you check the docs?
On the website:
http://clojure.org/API#toc21
Within clojure itself:
user> (doc ->)
ot;&" in your fn
arglist, the remaining arguments are bound to it as a lazy seq. On
each call, only as many arguments as you explicitly declare are
actually evaluated.
-Jason
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
1 - 100 of 642 matches
Mail list logo