Interpret

From Esolang
Jump to navigation Jump to search

Everything

Interpret is a metaprogramming language that uses reduction

Stuff

Types

write types = [<somthings>] to make the types

types = [
eval x,
app a b,
Z,
S,
F x,
]

Reduce

For any things that contain inputs, (like the App function in the previous example), you can write a reduction, "<func> = <reduce>"

eval x = x
eval (app I x) = eval x
eval (app x y) = app (eval x) eval (y)
eval (app S x) = F (x)

Tests

Test by doing "test <something> (<expected>)?"

test (app I I)
test (app S Z) (F Z)