MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

A Reap Sow question

  • To: mathgroup at
  • Subject: [mg65193] A Reap Sow question
  • From: János <janos.lobb at>
  • Date: Fri, 17 Mar 2006 00:13:34 -0500 (EST)
  • Sender: owner-wri-mathgroup at


First, thanks a lot to Valeri Astanoff, Daniel Lichtblau, David Park  
and Carl Woll  for the valuable suggestions to my previous post.

Let say I have a construct like

collection=Reap[i=1; While[i<=10,Sow[i]];]

Is it possible to put a condition on Sow referring back to  
collection ?  Something like:

collection=Reap[i=1; While[i<=10,If[Length[First[Last[collection]] ] 
 >5,,Sow[i] ] ];]

If not, - I have not seen any indication in Help either way - , what  
technique can be used to get a similar effect without resorting to  
global lists or arrays?

Thanks ahead,


I am seriously convinced that the world is ruled by complete  
lunatics. The ones who are not crazy are either refraining from it,  
or are unable to participate in it.  <Leo Tolstoy>

  • Prev by Date: Re: Laplace Transform
  • Next by Date: Re: getting one random number
  • Previous by thread: Re: Delayed Differential Equations [NDelayDSolve]
  • Next by thread: Re: A Reap Sow question