Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Let Ǎ, Ǐ, Ǒ be triads +, ÷, × be dyads A, I, O be monads 1, 2, 3 be nilads

Monadic Chaining

Pattern : curr =
+ A     : curr + A(alpha)
+ 3     : curr + 3
3 +     : 3 + curr
+       : curr + alpha
A       : A(curr)

Additional Rules

Pattern : curr =
2 3 Ǎ   :  Ǎ(2, 3, curr) -> (2).Ǎ(3, curr)
2 Ǎ 3   :  Ǎ(curr, 2, 3) -> curr.Ǎ(2, 3)
+ × Ǎ 2 :  Ǎ(curr + alpha, curr × alpha, 2) -> (curr + alpha).Ǎ(curr × alpha, 2)
A 1 Ǎ 2 :  Ǎ(A(curr), 1, 2) -> A(curr).Ǎ(1, 2)
Ǎ +     :  Ǎ(curr, alpha, alpha + curr) -> curr.Ǎ(alpha, curr + alpha)
Ǎ I     :  Ǎ(curr, alpha, I(alpha)) -> curr.Ǎ(alpha, I(alpha))
Ǎ 2     :  Ǎ(curr, alpha, 2) -> curr.Ǎ(alpha, 2)
Ǎ       :  Ǎ(curr, alpha, alpha) -> curr.Ǎ(alpha, alpha)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment