Re: Re: Asking questions

*To*: mathgroup at smc.vnet.net*Subject*: [mg58280] Re: Re: Asking questions*From*: Bharat Bhole <bbhole at gmail.com>*Date*: Sat, 25 Jun 2005 01:56:46 -0400 (EDT)*References*: <200506230642.CAA14625@smc.vnet.net> <200506240728.DAA00319@smc.vnet.net> <20050624202344.GX10603@wolfram.com>*Reply-to*: Bharat Bhole <bbhole at gmail.com>*Sender*: owner-wri-mathgroup at wolfram.com

Thanks to Everyone for your help. I really appreciate it. Unfortunately, because I am novice as far as Mathematica Programming is concerned I am not familiar with Functional Programming. I have a question about the following statement which most of you have sent ((Print[#]; #)&@f[#]) & /@ Range[10] Where do I type it? Do I type it just after the MapThread command and exactly as you have given it. You do not need to answer me just yet. I will try doing this and the Procedural hint given by Andrzej Kozlowski. Although he has given the hint for the "Do command" I will try to apply the same for MapThread. I have not got a chance to try this out yet. Again, thanks very much for your input. I really appreciate it. Bharat. On 6/24/05, stephen layland <layland at wolfram.com> wrote: > > and thus spake Bharat Bhole [2005.06.24 @ 02:30]: > > > > Suppose I am running a code > > MapThread[func,{Table[d,{d,1,10}]] which takes very long to evaluate for > the > > entire list. Mathematica gives me the output ONLY after 'func[d]' has > been > > evaluated for all d from 1 to 10. > > That's because the kernel is only doing what you tell it to do. The > matheamtica kernel is single threaded. You will only 'get a result' > when the entire function has been evaluated. > > > Is it possible to make Mathematica give > > the output as it is evaluating after each d. For example, is it possible > to > > make it give output after it has evaluated func[1], then func[2] and so > on. > > Thank you for your help. > You can get the kernel to Print[] the results as it maps like: > > ((Print[#]; #)&@f[#]) & /@ Range[10] > > but this still won't allow you to use the results in the kernel until > the entire Map call has ended. > > (unless, of course, you use another mathematica kernel). > > -- > /*------------------------------*\ > | stephen layland | > | Documentation Programmer | > | http://members.wri.com/layland | > \*------------------------------*/ >

**References**:**Re: Asking questions***From:*Bharat Bhole <bbhole@gmail.com>