Sha256: fb8759dfad26a3eae7fb0d62ed7f32121a70a0e67c5c36e7a57f938295a99768
Contents?: true
Size: 532 Bytes
Versions: 17
Compression:
Stored size: 532 Bytes
Contents
(datatype arith-expr X : number; ==================== [num X] : arith-expr; if (element? Op [+ - * /]) X : arith-expr; Y : arith-expr; =============================== [X Op Y] : arith-expr;) (define do-calculation {arith-expr --> number} [X + Y] -> (+ (do-calculation X) (do-calculation Y)) [X - Y] -> (- (do-calculation X) (do-calculation Y)) [X * Y] -> (* (do-calculation X) (do-calculation Y)) [X / Y] -> (/ (do-calculation X) (do-calculation Y)) [num X] -> X)
Version data entries
17 entries across 17 versions & 1 rubygems