MathGroup Archive 2006

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

Search the Archive

Re: generalized foldlist problem - part 2

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69185] Re: [mg69138] generalized foldlist problem - part 2
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Fri, 1 Sep 2006 06:41:21 -0400 (EDT)
  • References: <200608310838.EAA19506@smc.vnet.net> <03162F89-A4A8-4977-A494-E8ADFC4C9003@mimuw.edu.pl> <47EB8B12-D057-4AE3-8534-9B3A0CCCB490@mimuw.edu.pl>
  • Sender: owner-wri-mathgroup at wolfram.com

On 31 Aug 2006, at 22:22, Andrzej Kozlowski wrote:

> On 31 Aug 2006, at 20:49, Andrzej Kozlowski wrote:
>>
>> (PS. In answering part 1 I obviously misunderstood your question,  
>> but I think that was mainly because I do not think your function  
>> is in any way a "generalisation of Fold", or even of Fold 
>> [Plus,element,list]. As far as I can see it does not really  
>> perform any kind of "folding".
>
> On second thoughts, I withdraw most of that PS. Taking list2= 
> {1,1,1,...} in your original function, we certainly get a  
> generalisation of FoldList[Plus,First[list1],Rest[list1]], so the  
> subject name "generalised foldlist problem" is not entirely  
> unjustified. However, it seems to me that describing the function  
> in this way  confuses rather then clarifies what the function does  
> (hence, I think, Jens remarks in reply to your original post and my  
> comment above). It seems to me that the best description of your  
> problem is terms of the matrix that you used in part 2. Could you,  
> perhaps, explain how this problem arose and what you are "really  
> trying to do"?
>
> Andrzej Kozlowski
>


Sorry, wrong again. We need to take list2 = Table[Length[list1],  
{Length[list1]}] to get a generalisation of FoldList[Plus,First 
[list1],Rest[list1]].

Andrzej Kozlowski


  • Prev by Date: Re: Unexpected "Invalid comparison" error when plotting function defined with a Condition pattern
  • Next by Date: Re: generalized foldlist problem - part 2
  • Previous by thread: Re: generalized foldlist problem - part 2
  • Next by thread: Re: generalized foldlist problem - part 2