RosettaCodeData/Task/Arithmetic-Integer/Ol/arithmetic-integer-2.ol

6 lines
237 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
; you can use more than two arguments for +,-,*,/ functions
(print (+ 1 3 5 7 9)) ; ==> 25
(print (- 1 3 5 7 9)) ; ==> -23
(print (* 1 3 5 7 9)) ; ==> 945 - same as (1*3*5*7*9)
(print (/ 1 3 5 7 9)) ; ==> 1/945 - same as (((1/3)/5)/7)/9