RosettaCodeData/Task/Arithmetic-Integer/Racket/arithmetic-integer.rkt
Ingy döt Net 0457928c3e ...
2013-04-10 15:42:53 -07:00

7 lines
225 B
Racket

#lang racket
(define (arithmetic x y)
(for ([op '(+ - * / quotient remainder modulo max min gcd lcm)])
(displayln (~a (list op x y) " => "
((eval op (make-base-namespace)) x y)))))
(arithmetic 8 12)