Skip to content

01-hovers

Source: examples/01-hovers.metta

Imports

This module has no imports.

Symbols

SymbolKindType
factorialfunction(-> Number Number)

Functions

factorial

Kind: function

metta
(: factorial (-> Number Number))

The factorial of n. One clause guards the base case with if: a separate (= (factorial 0) 1) would also match (factorial $n) in MeTTa and recurse into negatives forever, so the if keeps it to a single path.

Source: examples/01-hovers.metta:23

Released under the Apache-2.0 License.