Module: Rus3::Procedure::Arithmetic
- Included in:
- Evaluator::Environment
- Defined in:
- lib/rus3/procedure/arithmetic.rb
Overview
This module holds arithmetic operation procedures of Scheme.
Instance Method Summary collapse
- #add(*args) ⇒ Object
- #div(*args) ⇒ Object
- #mod(*args) ⇒ Object
- #mul(*args) ⇒ Object
- #subtract(*args) ⇒ Object
Instance Method Details
#add(*args) ⇒ Object
10 11 12 |
# File 'lib/rus3/procedure/arithmetic.rb', line 10 def add(*args) a_calc(:+, *args) end |
#div(*args) ⇒ Object
22 23 24 |
# File 'lib/rus3/procedure/arithmetic.rb', line 22 def div(*args) a_calc(:/, *args) end |
#mod(*args) ⇒ Object
26 27 28 |
# File 'lib/rus3/procedure/arithmetic.rb', line 26 def mod(*args) a_calc(:%, *args) end |
#mul(*args) ⇒ Object
18 19 20 |
# File 'lib/rus3/procedure/arithmetic.rb', line 18 def mul(*args) a_calc(:*, *args) end |
#subtract(*args) ⇒ Object
14 15 16 |
# File 'lib/rus3/procedure/arithmetic.rb', line 14 def subtract(*args) a_calc(:-, *args) end |