Added support for the minus operator.
This commit is contained in:
parent
fe4533c7ae
commit
a36de2bde1
7 changed files with 48 additions and 12 deletions
|
|
@ -24,11 +24,10 @@ fibbonaci x = case x of {
|
|||
0 => 0,
|
||||
1 => 1,
|
||||
-- abusing overflows to represent negatives like a boss
|
||||
_ => (fibbonaci (x + 9223372036854775807 + 9223372036854775807))
|
||||
+ (fibbonaci (x + 9223372036854775807 + 9223372036854775807 + 1))
|
||||
_ => (fibbonaci (x - 2))
|
||||
+ (fibbonaci (x - 1))
|
||||
} : Int;
|
||||
|
||||
faccer : Int -> Int;
|
||||
|
||||
main : Int;
|
||||
main = fibbonaci 10;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue