home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / TESTS / IN / PROFILER.IN < prev    next >
Text File  |  1996-06-04  |  254b  |  19 lines

  1. fact(0) -> 1.
  2. fact(N) -> N*fact(N-1).
  3. app([],L,L).
  4. app([X|L1],L2,[X|L3]) :- app(L1,L2,L3).
  5. import("profiler")?
  6. profile(fact,app,level=>call)?
  7.  
  8. A=fact(5)?
  9.  
  10. write_stats(fact)?
  11. write_stats(app)?
  12. app(A,B,[1,2,3])?
  13. ;
  14. write_stats(app)?
  15. ;
  16. ;
  17. ;
  18. write_stats(app)?
  19.