RosettaCodeData/Task/Arithmetic-Integer/Scheme/arithmetic-integer.scm

10 lines
267 B
Scheme

(define (arithmetic x y)
(for-each (lambda (op)
(write (list op x y))
(display " => ")
(write ((eval op) x y))
(newline))
'(+ - * / quotient remainder modulo max min gcd lcm)))
(arithmetic 8 12)