home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e032 / 3.ddi / FILES / PROGRAMM.PAK / UNTIL.M < prev    next >
Encoding:
Text File  |  1992-07-29  |  498 b   |  21 lines

  1.  
  2. (*********************************************************************
  3.  
  4.         Adapted from
  5.         Roman E. Maeder: Programming in Mathematica,
  6.         Second Edition, Addison-Wesley, 1991.
  7.  
  8.  *********************************************************************)
  9.  
  10.  
  11. Until::usage = "Until[body, test] evaluates body until test becomes true."
  12.  
  13. Begin["`Private`"]
  14.  
  15. Attributes[Until] = {HoldAll}
  16.  
  17. Until[body_, test_] := Module[ {t}, For[ t=False, !t, t=test, body ] ]
  18.  
  19. End[]
  20. Null
  21.