seems to limit loops a great deal.
>
> You just need to ensure you are building the sequences in an eager manner,
> rather than a lazy manner.
>
>
>
> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you'r
piast...@gmail.com
Sent: Saturday, April 1, 2017 9:56 PM
To: Clojure
Subject: Re: I can not find any function that might give rise
tothisStackOverflow error
> Because when you recur in your loop, you’re passing in lazy sequences, so
> those
> are essentially building up a giant
mail.com
> *Sent: *Saturday, April 1, 2017 9:56 PM
> *To: *Clojure
> *Subject: *Re: I can not find any function that might give rise
> tothisStackOverflow error
>
>
>
>
> > Because when you recur in your loop, you’re passing in lazy sequences,
> so thos
s View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
From: piastkra...@gmail.com
Sent: Saturday, April 1, 2017 9:56 PM
To: Clojure
Subject: Re: I can not find any function that might give rise
tothisStackOverflow error
> Bec
t...@gmail.com
> *Sent: *Saturday, April 1, 2017 6:52 PM
> *To: *Clojure
> *Subject: *Re: I can not find any function that might give rise to
> thisStackOverflow error
>
>
>
>
> Crazy! I re-wrote the (loop) to use (reduce) instead and now everything
> works:
>
l.com
Sent: Saturday, April 1, 2017 6:52 PM
To: Clojure
Subject: Re: I can not find any function that might give rise to
thisStackOverflow error
Crazy! I re-wrote the (loop) to use (reduce) instead and now everything works:
(defn loop-over-scores
[set-of-scores]
"2017-03-08 -- called
I'm away from a Clojure REPL to poke at this but I think trapping this in a
debugger would trivially reveal the source of recursion. Set a breakpoint at
the start of the loop and step through. If using Cursive / IntelliJ set a
breakpoint to detect StackOverflow and inspect the call stack.
>
Crazy! I re-wrote the (loop) to use (reduce) instead and now everything
works:
(defn loop-over-scores
[set-of-scores]
"2017-03-08 -- called from start.clj"
(reduce
;; 2017-04-01 -- we assume vector-with-path-score looks like this:
;; [[:positive :true 0.88 19 60 10 12 3 1 3 1 2
Well, I am out of ideas. Let's assume I'll re-write this some other way.
What would be better than using (loop)? What would be less likely to cause
StackOverflow, or at least reveal why I'm seeing it.
On Saturday, April 1, 2017 at 6:23:29 PM UTC-4, piast...@gmail.com wrote:
>
>
> I have a
So for instances, starting with an object that has about 32,000 lines that
need to be looped over, the code gets this far:
in loop-over-scores again 2375
It prints that out and then throws StackOverflow error.
But I don't see anything in there that would exhaust the stack. These
functions
I have a function that will run repeatedly, so I use the at-at library to
call it:
https://github.com/overtone/at-at
I don't think this is the problem.
Sad to say, the Error is catching a StackOverflow, which I'm having trouble
finding. I don't see a place where I call a function
? p coll)
Returns *true* if (pred x) is logical true for any x in coll,
else *false*.
Since *nil* and *false* are both falsy, some can be used as a predicate
that is truthy
when it finds truthy result, otherwise falsy. This is exactly the behavior
expected from
an any? function.
some
Hello everyone. In looking through the API documentation, I've noticed
that there is a not-any? function available, but there is no
corresponding inverse any? function that I can find. There are,
however, every? and not-every? functions available. The closest I
could find was some, but wouldn't
for any x in coll,
else *false*.
Since *nil* and *false* are both falsy, some can be used as a predicate
that is truthy
when it finds truthy result, otherwise falsy. This is exactly the behavior
expected from
an any? function.
some is a poster boy for Clojure's well thought out truthyness system
*nil* and *false* are both falsy, some can be used as a predicate
that is truthy
when it finds truthy result, otherwise falsy. This is exactly the behavior
expected from
an any? function.
some is a poster boy for Clojure's well thought out truthyness system,
this is a great example
of the types
can be used as a predicate
that is truthy
when it finds truthy result, otherwise falsy. This is exactly the behavior
expected from
an any? function.
some is a poster boy for Clojure's well thought out truthyness system,
this is a great example
of the types of general functions it allows
that is truthy
when it finds truthy result, otherwise falsy. This is exactly the
behavior expected from
an any? function.
some is a poster boy for Clojure's well thought out truthyness system,
this is a great example
of the types of general functions it allows.
Perhaps a pointer to some should be added
On Tue, Jun 14, 2011 at 12:29 PM, Ambrose Bonnaire-Sergeant
abonnaireserge...@gmail.com wrote:
some is a poster boy for Clojure's well thought out truthyness system,
this is a great example of the types of general functions it allows.
Notably, with a map as first argument it returns the first
There is one use of any? over some which hasn't been mentioned:
checking whether a list contains a nil.
ie. (when (any? nil? xs) (do stuff))
vs. (when (some nil? xs) (do stuff))
-Patrick
On Jun 14, 9:00 pm, Ken Wesson kwess...@gmail.com wrote:
On Tue, Jun 14, 2011 at 12:29 PM, Ambrose
On Wed, Jun 15, 2011 at 9:14 AM, CuppoJava patrickli_2...@hotmail.comwrote:
There is one use of any? over some which hasn't been mentioned:
checking whether a list contains a nil.
ie. (when (any? nil? xs) (do stuff))
vs. (when (some nil? xs) (do stuff))
Actually, this case works with
the
behavior expected from
an any? function.
some is a poster boy for Clojure's well thought out truthyness system,
this is a great example
of the types of general functions it allows.
Perhaps a pointer to some should be added in the docstring of
not-any?. Although
a quick look at the source
On Sun, Oct 5, 2008 at 2:55 PM, Vincent Foley [EMAIL PROTECTED] wrote:
I was surprised to see that Clojure doesn't have an any? function. I
saw every?, not-every? and not-any? but no any?. Is there a reason
for this?
user= (doc some)
-
clojure/some
([pred coll
22 matches
Mail list logo