The `~` symbol stands for NOT. It takes two arguments and calculates the 60-bit binary NOT of the first one, but ignores its second one. However, because of implementation details, the second argument must be a number too.
HVM-lang also includes a `match` syntax for native numbers. The `0` case is chosen when `n` is 0, and the `+` case is chosen when `n` is greater than 0. The previous number, by default, bound to `n-1`.
```rs
Number.to_church = λn λf λx
match n {
0: x
+: (f (Number.to_church n-1 f x))
}
// Alternative syntax
Number.to_church = λn λf λx
match n {
0: x
+p: (f (Number.to_church p f x))
}
```
Using everything we learned, we can write a program that calculates the n-th Fibonacci number using native numbers