RosettaCodeData/Task/Arithmetic-Integer/Racket/arithmetic-integer.rkt

8 lines
198 B
Racket
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
#lang racket/base
2013-04-10 15:42:53 -07:00
(define (arithmetic x y)
2016-12-05 22:15:40 +01:00
(for ([op (list + - * / quotient remainder modulo max min gcd lcm)])
(printf "~s => ~s\n" `(,(object-name op) ,x ,y) (op x y))))
2013-04-10 15:42:53 -07:00
(arithmetic 8 12)