Re: Do-command
- To: mathgroup at smc.vnet.net
- Subject: [mg102613] Re: [mg102588] Do-command
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 17 Aug 2009 04:01:34 -0400 (EDT)
- Reply-to: hanlonr at cox.net
Do merely evaluates its expression it does not produce any output separate from what the expression does. Or as the help for Do states: Unless an explicit Return is used, the value returned by Do is Null. Use Table Table[Select[{1, 2, 4, 7, 6, 2}, # >= i &], {i, 7}] {{1,2,4,7,6,2},{2,4,7,6,2},{4,7,6},{4,7,6},{7,6},{7,6},{7}} Bob Hanlon ---- Uwe Gotzes <u.gotzes at googlemail.com> wrote: ============= Hi! Can anybody tell, why Do[Select[{1, 2, 4, 7, 6, 2}, # >= i &], {i, 7}] does not produce output in Mathematica?