- To: mathgroup at smc.vnet.net
- Subject: [mg7063] Until
- From: Sean Ross <SEAN at mail.creol.ucf.edu>
- Date: Sat, 3 May 1997 22:04:54 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Mathematica has a built-in While[test,body] stucture where the test is evaluated and if true, body is evaluated until test fails. I would like an Until structure where the body is evaluated until a test is true. Logically, Until[test_,body_]:=body: While[Not[test],body] but the above code doesn't work. I am guessing it has something to do with a Hold-type attribute, but I haven't been able to figure it out. Does anyone know how to conventiently make a new construct like the Until structure above? Related is how can I make my own function which will accept as an argument an expression like Integrate accepts for its first argument? Thanks. Sean.