home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / developm / language / quinta.cpt / Quinta / fact.q next >
Text File  |  1990-03-22  |  278b  |  11 lines

  1. ;
  2. ; This is the source for a simple recursive factorial function
  3. ; in Quinta.  This is already built into the Quinta interpreter.
  4. ; It illustrates the use of recursion and conditionals.
  5. ;
  6.  
  7. [ "n" local n 1 == if then 1 else n n 1 - recurse * endif ]
  8. "fact" pub integer respond
  9.  
  10.  
  11.