MathGroup Archive 2001

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

Search the Archive

Local iterator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29361] Local iterator
  • From: "Vincenzo Vasta" <vvasta at btinternet.com>
  • Date: Fri, 15 Jun 2001 02:23:33 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I would like to write a function like Table, or Do, that takes an iterator
and invokes a specified function for each value in the iterator interval, I
could write something working without iterator:

SetAttributes[myfun,HoldAll];
myfun[fun_, it_, vmin_, vmax_] := Block[{it},
    For[it = vmin, it <= vmax, ++it, Print[fun]]
    ]

myfun[N[Log[x]],x,1,10]


How can I write a function like myfun[f,{i,mix,max,step}] ?

 Thanks
Vincenzo




  • Prev by Date: formatting numbers with Export[file,exp,"Table"] possible?
  • Next by Date: Can Mathematica evaluate step by step???
  • Previous by thread: Re: formatting numbers with Export[file,exp,"Table"] possible?
  • Next by thread: Re: Local iterator