Fold and FoldList Problems
- To: mathgroup at smc.vnet.net
- Subject: [mg45443] Fold and FoldList Problems
- From: GlennRoberts at hbosts.com
- Date: Wed, 7 Jan 2004 17:31:07 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
here is one that might be easy and i am just not getting it - help appriciated - i have written a small function h[x_] say in a .m file that returns a list as its answer - i would like to past this list thou a function in the same .m file that does: g[x_]:= Fold[Plus,0,h[x]] simple enough i thought but i get a error message returned that tells me the g[x_] function is trying to calcualte on each element of the list h[x] rather than the full list to return the sum - not sure what has gone wrong on this one - thanks - glenn