2019-09-24 21:05:38 +02:00
|
|
|
class Integer < Data4
|
|
|
|
def <(right)
|
|
|
|
X.comparison(:<)
|
|
|
|
end
|
|
|
|
def +(right)
|
|
|
|
X.int_operator(:+)
|
|
|
|
end
|
|
|
|
def -(right)
|
|
|
|
X.int_operator(:-)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2018-08-18 19:06:15 +02:00
|
|
|
class Space
|
|
|
|
|
|
|
|
def fibo_r( n )
|
|
|
|
if( n < 2 )
|
|
|
|
return n
|
|
|
|
else
|
|
|
|
a = fibo_r(n - 1)
|
|
|
|
b = fibo_r(n - 2)
|
|
|
|
return a + b
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def main(arg)
|
2019-07-25 20:25:15 +02:00
|
|
|
return fibo_r(5)
|
2018-08-18 19:06:15 +02:00
|
|
|
end
|
|
|
|
end
|