(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
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
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
, 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
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
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
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
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
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
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
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
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
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
(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
> 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"
While the "use it as an argument" case is important, it can also be useful when
writing functions that return functions, when you want to provide a "do
nothing" response.
In those cases, just don't forget that identity will throw if given ≠1
arguments.
--
You received this message because you
On Wednesday, August 10, 2011 4:15:48 PM UTC-4, Alf wrote:
>
> Should this not be a seq?
That depends on how you interpret the plural ("immediate superclass and
direct interfaces") in its docstring.
user> (clojure-version)
"1.2.1"
user> (use 'clojure.contrib.core 'clojure.pprint)
nil
user> (ppr
The . limitation is in bash vars only; they work fine as environment vars:
$ clojure.load.path=whatever command
Some error message I forget
$ env clojure.load.path=whatever command
Sets env var while running command
You should already have env installed. It's pretty useful if you like working
i
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
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
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
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
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
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
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
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
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
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
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
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 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
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
(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
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: [:
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
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
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
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
(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
--
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? :)
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
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
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
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
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
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
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
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
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
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
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
~@(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
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
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
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
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
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
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]":
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: [
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
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
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
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
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 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
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
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
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
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
them. Including the two earlier today.
While I noticed `update' was missing, it didn't bother me.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
his idea. One more hint before you embark: defend
yourself from parallel loading.
--
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, sen
Clojure-level facility should give you a
nudge to consider such alternatives, it's perfectly fine to call Java
when needed.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Google
Groups "Clo
to the equivalent `map' form would make it even clearer.
This does yield an interesting potential alternative, though: you could
think of maps and vectors as key/value sequences all the way down, so
producing a lazy result. You can always get the map back with (into
{} ...) at that point.
rd R [a b c])
>
> Is there something equivalent to:
>
> (def r (apply R. ["a" "b" "c"]))
>
> available? (without writing macros?)
The above generates ->r in 1.3. Check the link above for more.
--
Stephen Compall
^aCollection allSatisfy: [:eac
cons 88 (map prn [4 6])) nil)
nil
user=> (do (conj (map prn [4 6]) 88) nil)
4
6
nil
Conj forces its collection argument if it's a lazy seq.
--
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better
--
You received this message because you are subscribed to the Googl
-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.
, 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
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
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
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
. 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
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
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
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
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
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
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
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
> 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 ...
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
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
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
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
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
'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
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
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]
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
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
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
1 - 100 of 109 matches
Mail list logo