(merge-with + [1 2 3] [4 5 6 7])
(merge-with + {6 7, 8 9} [1 2 3])
(merge-with + [1 2 3] {})
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
> All of the above program using lazy-seq
As you have seen, lazy-seq is not a silver bullet.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure"
(G v)))]
What happens if you do ^^^ *after* vvv?
> (explored v) (recur vs explored lhalf rhalf (inc iter-cnt))
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
--
You received this message because you are subscribed to the G
your-record))
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
--
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
d evaluate to 12.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
--
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
bugging such things:
https://github.com/technomancy/leiningen/blob/2.0.0/sample.project.clj#L152
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
e's nature significantly.
> (do
>(assoc! curr (inc j) 0)
>(recur (inc j) max-len)))
Nor is it safe to discard the result of calling assoc!; see how assoc! is
used in other online examples.
--
Stephen Compall
If anyone in th
that several
library functions, like map, filter, iterate, and take-while are all
lazy-friendly.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To p
ed updates.
Yes.
Aside from the mutability issue, I also had other problems to which graphs
were well-suited, but cells-ishs were not.
For example, given the metadata to build a graph, "optimum conversion
function" generalizes to "shortest path".
--
Stephen Compall
If any
ation, I found more use for Jeff Straszheim's graph
contrib library, now packaged with datalog, than the cells-ish stuff.
This is probably because my Clojure style seeks immutable solutions, and
cells-ishs don't fit in that category.
--
Stephen Compall
If anyone in the MSA is online, you
On Jan 21, 2013 3:28 PM, "Jim - FooBar();" wrote:
> ...or you can go all the way, skipping reset! completely:
>
> (swap! game-objects (fn [objects] (reduce-kv #(assoc % %2 (update-object
%3)) {} objects) ))
Which also has the benefit of being safe, unlike any reset!-based
ovides some hint about the
name. Scala calls it PartialFunction, but I think this is somewhat
confusing.
Since constant functions can have their domains transformed forwards,
unlike Kma, perhaps it would be useful to also encode that in a
superinterface of wherever this hierarchy introduces Se
, assoc, and both valAts.
Because such an isomorphism exists, the only reason to use this
not-a-function is to exploit the extra operations and guarantees by law
we get, and allowing domain transformation this way is a stronger claim
than the ability to override particular mappings.
--
Stephen Compall
^a
Once you're enumerating the
domain, you can just apply the associative to produce the codomain, and
thus, "enumerate the contents."
The only way you can apply both transformations is if your domain is
vacuous: that is, constant functions like yours are the only ones that
permit do
of its superclasses are also implied. So I
think inheriting Seqable is a positive statement of this law:
anAssociative.entryAt(k) returning entry E,
implies that (seq anAssociative) contains E.
But I cannot be sure. Without this law, though, you are basically left
with (pure) function.
--
Step
ption (Seqable ...)))
[1] https://github.com/frenchy64/typed-clojure/wiki
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure
Windows works. You'll have to do something else, maybe wrap the
repl call in (future ...), maybe put your actual app in a separate file.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this message because you are subscribed to the Goo
u do
not need to process them in numeric order, your suggested approach is fine.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group
rvices of the `clojure.zip' module, included with the standard
distribution, to avoid mutable constructs and still be able to walk up
and down your tree.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed t
On Jan 4, 2013 6:06 PM, "larry google groups"
wrote:
> (swap! recent-activity concat feed @recent-activity)
This swap! replaces the value in recent-activity with (concat
@recent-activity feed @recent-activity), approximately.
--
Stephen Compall
If anyone in the MSA i
Yes. Last thread here:
http://thread.gmane.org/gmane.comp.java.clojure.user/66294 ; search for
further threads on the seq* trichotomy.
tl;dr don't use 'list?'.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this message because you a
On Dec 27, 2012 11:55 PM, "Sukh Singh" wrote:
> Is there any chance of clojure community abandoning the JVM as the
> primary plaform in the future?
Yes.
Who knows what machines lurk in the hearts of programmers?
--
Stephen Compall
If anyone in the MSA is online, you s
d be in favor of eliminating list?, really, in favor of
seq?/sequential?/seqable?.
> I think that this can be pretty confusing... Shouldn't it be fixed (at
> least the docstring)?
http://dev.clojure.org/jira/
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is be
here. clojure.core provides
`line-seq', which, for line-buffered streams like stdin, would provide
the functionality you want.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message because you are subscribed to t
covers everyone :)
> Would that make it easier to generate sha1's for example?
> Is it useful for sound/video-like streams?
In both cases, I imagine so.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this m
r-array-seq-sequence implements all of CharSequence.
While this release doesn't have types, typed-clojure gave me the impetus
to clean this up and finish the outstanding TODOs, so special thanks to
Ambrose Bonnaire-Sergeant for providing that.
--
Stephen Compall
^aCollection allSatisfy: [
is (string? (gen-key)) "Must return a string.")
A comment that merely repeats the code may be elided. Unlike Python's
unittest, c.test can tell you where the error is, the form that produced
it, &c.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]":
e
under GPL. If I am wrong, though, I encourage you to explore it further.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send emai
dure for submitting patches. Shall
I send it someone, put it somewhere?
If you are willing, follow instructions on http://clojure.org/contributing.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this message because you are subscribed to the Go
oduce conses. Compare seq?, sequential?, and
incubator's seqable? to find the predicate you want.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message because you are subscribed to the Google
Groups "Clojure&qu
ted
Write it like (gen-class :name foo.bar$Baz) and you'll be fine. This
works for me on Clojure 1.4.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message because you are subscribed to the Google
Groups "Clojur
think the thesis of this thread is that, from the perspective of
varying levels of Clojure expertise, such means would be more of a
hindrance than a help in your goal.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message
~@(map (fn [name] `(defrecord ~name [~'x])) names)))
;; makes classes foo, bar, baz, qux, quux, all with the :x field.
(defrefs foo bar baz qux quux)
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to t
ume that Brian's original example involved such constraints,
implicitly; i.e., a, b, c, d, e are metasyntactic variables in prose
referring to values, not type variables.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this messag
n compose functions with different
> input/output types without using monads.
We can always write things out explicitly instead of exploiting existing
abstractions. As for macros, the above samples use ordinary Haskell
function calls.
--
Stephen Compall
"^aCollection allSatisfy: [:e
MySql).
>
> I am curious what is the absolutely easiest way to do this?
The easiest auth system to write is the one that's already written.
https://github.com/cemerick/friend
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this
hink can it be?
It's difficult to tell without usable, minimized examples of succeeding and
failing code. This exercise may even tell you what is wrong.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this message because you are subscribed to
the typical console user — is
likely to be ill-served by a REPL exit. A counterexample demonstrates this:
Squeak drops into a debugger on normal execution failure, as historical
Smalltalk philosophy is that all computer users should learn programming.
--
Stephen Compall
Greetings from sunny A
bug, or a behavioral one? I would say the
former; we are, after all, in a context in which functions have primacy
over maps.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message because you are subscribed to the Goo
n using
the abstractions.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
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
On Tue, 2012-09-04 at 17:31 -0500, Brian Marick wrote:
> user=> (defmulti collide classify-colliding-things)
If you're okay with a little handwaving, how about
(defmulti collide #'classify-colliding-things)
Now there is no need to rerun defmulti.
--
Stephen Compall
"^a
On Tue, 2012-09-04 at 15:24 -0700, Sean Corfield wrote:
> But that is a hypothetical, yes? You're not suggesting that take-while
> actually does that, right?
Right. As of right now.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
er(cls.getResourceAsStream(
> cls.getName.replaceFirst("^.*\\.", "") + ".class"))
> }
That assumes that this craziness doesn't get in the way. The trick here
is that by putting your reify/deftype/proxy *once*, AOTing that, you'll
reuse t
yes.
[1] I can, however, say that the documented invariant was added in Rich
Hickey's a8307cc8, back in 2008.
[2] Describing such examples would be rather esoteric for this thread, I
feel.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
On Mon, 2012-09-03 at 01:12 -0700, Alan Malloy wrote:
> (map #(do %2 %1) c1 c2) is a neat trick I hadn't seen in this context;
> thanks for showing me!
Perhaps you'd also like to advocate for the inclusion of `first-arg',
which has several other uses, in core? :)
(1 2 3 4)))
1nil
There's some misinformation on the web about exactly how this works; I
recommend reading the implementations of map, filter, and concat in
core.clj to gain a better understanding of seq chunking.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
fore you try to reference it from
gen-class.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to cloj
ons (partial apply merge) #{}),
(take-while #(...)), (map #(do %2 %1) ss), last)
Use of `atom' for this sort of thing is certainly an antipattern, so
consider any alternative that suits you.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
Yo
in a transparent way.
When you want this,
(let [{blah} (merge my-defaults kwargs)]
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gr
t.
Omitting needless lets is a matter of style in this case.
--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@g
his isn't universal, though.
> 2. Is there a reference somewhere out there where I could consult these
> kinds of questions?
The best reference is existing project practice; there's a wealth of
free software source code out there.
--
Stephen Compall
^aCollection allSatisfy: [:
(range 5
true
Laziness and nondeterminism make an explosive mixture.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to c
ling to produce something less happy
for Java, take a list of all possible whatevers and generate a big class
with all of the getters. Maybe you could derive that list from an XML
file of some kind.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received th
On Thu, 2012-06-14 at 13:33 -0700, dmirylenka wrote:
> Could you please explain a bit more?
>
> I don't have any dosync in my code.
Look through your backtrace for a call to
clojure.lang.LockingTransaction.runInTransaction. Its caller is using
dosync.
--
Stephen Compal
he IRC bots use.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
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 membe
On Jun 8, 2012 3:18 AM, "Cédric Pineau" wrote:
> (defn seqable?
More modernly, this function can be found in core.incubator.
--
Stephen Compall
Greetings from sunny Appleton!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group
p you achieve greater
simplicity, because they are strictly less powerful than their persistent
counterparts.
I suggest trying to find the simplest implementation, and worrying about
efficiency once you have that.
--
Stephen Compall
Greetings from sunny Appleton!
--
You received this me
ned termination condition.
--
Stephen Compall
Greetings from sunny Appleton!
--
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 b
though you perhaps have something
else in mind. The real trouble is discriminating between bound and free
vars.
--
Stephen Compall
Greetings from sunny Appleton!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send ema
lt to use just when you need it.
--
Stephen Compall
Greetings from sunny Appleton!
--
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 - pl
list of maps, you can't do that.
> I tried using one FUTURE for a REF but is not working.
Not sure what this means. Futures are IDerefs...
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Goog
e dance.
It is worth considering that even for some uncounted sequences, the cost
of a second traversal for "count" may be less than the bookkeeping cost
of keeping a count as you traverse once.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You re
on that assoc and conj
don't work on transients.
Idempotence [interpreted as identity over transients] would be even worse; it
would mean that 'into' is not a pure function.
reduce conj! is a decent replacement.
--
Stephen Compall
Greetings from sunny Appleton!
--
You receiv
in C#. How F# treats
those parameters is instructional: it converts any method using them
into a method that simply returns the extra results in a tuple with the
primary return value.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message
heory that
arglists are meant for humans, who can tell whether a boolean or
optional arg is probably meant from context, and not autocompleters.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Gr
d the same recur call be done using rest?
Yes.
> What is more idiomatic?
Use `next' when you are definitely about to force it with `seq',
`empty?', or something anyway, `rest' otherwise. `reduce' qualifies for
the former.
--
Stephen Compall
^aCollection allSatisfy
vectors.
>
In other words, diffing is key-sensitive, and seqs have keys 0, 1, ...
Compare:
user=> (diff ["a" "b" "c"] ['q 'q "c" "d"])
[["a" "b"] [q q nil "d"] [nil nil "c"]]
(With nils becaus
re+Did+Clojure.Contrib+Go .
In the selected example, duck-streams was replaced with the included
clojure.java.io in Clojure 1.2.
--
Stephen Compall
"^aCollection allSatisfy: [:each | aCondition]": less is better than
--
You received this message because you are subscribed to the Google
7;t tell you that AOT works in some context, because that SLIME
function is implemented as a regular load on swank-clojure's side.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups &q
n cleaner with the reader monad;
https://github.com/straszheimjeffrey/The-Kiln will, I think, be a good
use case for the reader monad when it's ready.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subsc
ot
`not-empty'. See core.clj:
(defn empty?
"Returns true if coll has no items - same as (not (seq coll)).
Please use the idiom (seq x) rather than (not (empty? x))"
...and several past discussions on this list not otherwise relevant to
this thread.
--
Stephen Compall
^aCollecti
n 1.3? There's one frequently-referenced page about the numerics
> changes, but that's obviously not the full extent of 1.3's changes.
http://dev.clojure.org/display/design/defrecord+improvements
The mostly complete master list is changes.txt or changes.md in the
source.
--
Stephen Com
pty
strings.
> 63: (assoc node :edges (apply assoc (.edges node) (edge-entry label
> child)))
:edges is better than .edges here. Accordingly, the builtin
`update-in' can simplify this.
> 70: (Node. (conj (.strings node) string) edges)))
It remains to be seen, but it see
faultHttpClient from Apache
httpcomponents-client can hold on to a stateful cookie jar for multiple
requests.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post
).
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
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
isn't in java.lang, so you won't be
able to refer to either of them without more stuff around this. Same
with `volume'.
> (-> (.GetActiveCamera) (.SetFocalPoint (.GetCenter volume 0 1
> 2)))
And why so many args to GetCenter?
--
Stephen Compall
^aCollect
aluated when compiling, not the
one evaluated when loading the compiled files later. In short, my-stuff
should have deterministic, repeatable results, and should therefore only
rely on deterministic features of (hey you!), e.g. gensyms will break.
--
Stephen Compall
^aCollection allSatisfy: [:e
resents (14 21 28 35), separating
;; lazy seqs from *both* odd and even streams
)
(lazy-seq
(prn "and this lazy seq has no first element to speak of")
nil)
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are su
tely to yield
(1 . more). It is the same problem with repeatedly concatting to the
end, and with left-fold in a top-down evaluation scheme like Haskell:
you can run out of stack if you must travel deep to get to the first
element.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]
s as desired:
>
> (conr (conr (conr '( 1 2 3) 4) 6) 7)
Though you should note that, despite the `lazy-seq' wrapper around the
body, as soon as you force the outermost seq, you're forcing all the way
down.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is
't count that among
them.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
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
On Mon, 2011-12-12 at 20:03 -0800, Simone Mosciatti wrote:
> Any suggest of how fix that ?
In general, avoid loop.
Specifically, try using letfn or (fn SOME-NAME-HERE [args...] ...) as
your recursion target.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is bet
two-return-values [...]
(let [retval ...]
(.put asides retval extra-data)
retval))
(let [x (function-with-two-return-values ...)]
(prn x)
(prn (.get asides x)))
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because yo
yields an
infinite sequence.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
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 me
yte reading can be accomplished by
writing a single iterate, a single take-while, and a single .read call.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To po
On Wed, 2011-12-07 at 13:41 +0200, Matteo Moci wrote:
> lein pom
>
> maybe setting up a fake simple lein project
> you can watch how the generated pom is different from yours.
Unfortunately, that pom is too fake to be useful as a comparison tool.
--
Stephen Compall
^aCollectio
> levels probably isn't near the top of the "to macro or not to macro?"
> checklist.
And may be anyway further generalized:
(defmacro <<- [& forms]
`(->> ~@(reverse forms)))
(<<- (let [x (foo) y (bar)])
(when y)
(let [ ])
(do ...
defmacro itself can
be defined as a simple syntax-case macro.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@go
On Mon, 2011-12-05 at 09:51 -0800, jlhouchin wrote:
> When I entered the closing " and then closing
> paren. I was fine.
You may also try backspace; unusually for a REPL, that works.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received t
ponent (as your
nested-maps example does), or add another map. One or the other is
faster depending on how many values you have.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clo
confines of an ns form; it implies the
creation of another namespace (besides the one you are creating!)
containing only bar, and aliasing that.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Grou
this pattern in defmacro fn in
clojure/core.clj.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
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 pos
path directories for a Leiningen project.
It's best to get Leiningen to compile your Java sources for you.
The :java-source-path and :javac-options project.clj settings will help
here.
If that is not feasible, try including the root of the class files in
the :extra-classpath-dirs project.clj op
eates a Java class, normally stuck in memory forever
unless you mess with the GC settings. I can't remember the details, but
each eval might make a class, too, depending on its complexity. Offset
the savings you get with unboxed representations by these costs when
evaluating records as your so
. This is perfectly workable, if you are careful.
Liberal application of :exclusions [org.clojure/clojure] is advised.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure&qu
test, only whether it's exported from the
namespace.
user> (doc deftest-)
-
clojure.test/deftest-
([name & body])
Macro
Like deftest but creates a private var.
nil
user> (deftest- abc (is 42))
#'user/abc
user> (meta #'abc)
{, :priv
with
Clojure 1.3; in what sense is 1.3 support "held off"?
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@g
that other map can fall away:
(defn apply-map-fn [m f & ks]
(into m (map (juxt identity (comp f m)) ks)))
Perhaps not what you were looking for, but hope this helps anyway.
More broadly, you might also want to think about what it means if one of
ks isn't in m.
--
Stephen Compall
, rather than reinventing that
part of Leiningen.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
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
N
-eval '{a (+), b (1 2)} '(concat a b)) to see the
difference. (Hint: it should yield (+ 1 2), literally.)
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
1 - 100 of 109 matches
Mail list logo