Replace the f64 with a Number enum which allows several number types to be added.
As for type inference I created the Number::Float(f64) and Number::Integer(i128) types which are generic types which then get downcasted when they are used with a known type.
Objective
Fix #2.
Solution
Replace the
f64
with aNumber
enum which allows several number types to be added. As for type inference I created theNumber::Float(f64)
andNumber::Integer(i128)
types which are generic types which then get downcasted when they are used with a known type.