home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / scheme / gjr / cmplrtst.lha / arith.scm next >
Encoding:
Text File  |  1990-03-27  |  607 b   |  51 lines

  1. ;;; -*- Scheme -*-
  2.  
  3.  
  4. #|
  5. Description:
  6.  
  7. This code tests generic arithmetic: possible open coding or
  8. special utilities invoked.
  9.  
  10. Usage:
  11. Try each of them as if they were +, etc.
  12. |#
  13.  
  14. (declare (usual-integrations))
  15.  
  16. (define (my-+ x y)
  17.   (+ x y))
  18.  
  19. (define (my-- x y)
  20.   (- x y))
  21.  
  22. (define (my-* x y)
  23.   (* x y))
  24.  
  25. (define (my-/ x y)
  26.   (/ x y))
  27.  
  28. (define (my-= x y)
  29.   (= x y))
  30.  
  31. (define (my-< x y)
  32.   (< x y))
  33.  
  34. (define (my-> x y)
  35.   (> x y))
  36.  
  37. (define (my-1+ x)
  38.   (1+ x))
  39.  
  40. (define (my--1+ x)
  41.   (-1+ x))
  42.  
  43. (define (my-zero? x)
  44.   (zero? x))
  45.  
  46. (define (my-positive? x)
  47.   (positive? x))
  48.  
  49. (define (my-negative? x)
  50.   (negative? x))
  51.