02-running
Source: examples/02-running.metta
Imports
This module has no imports.
Symbols
| Symbol | Kind | Type |
|---|---|---|
even | function | (even $x) |
fib | function | (-> Number Number) |
Functions
even
Kind: function
metta
(even $x)True when a number is even.
Source: examples/02-running.metta:25
fib
Kind: function
metta
(: fib (-> Number Number))The nth Fibonacci number. One clause guards the base case with if: in MeTTa every matching clause fires, so a separate (= (fib 0) 0) would also match (fib $n) and recurse into negatives — the if keeps it to a single path.
Source: examples/02-running.metta:19