1 # Some utility extensions for helping manipulate numbers
5 # Convert a list of digits into a number
7 self.map
{|d
| d
.to_s
}.join
.to_i
10 # Convert a two-item list of nubmers into a rational
12 Rational(self[0].to_i
, self[1].to_i
)
17 # Split a number into a list of digits
19 self.to_s
.split('').map
{|d
| d
.to_i
}