1
0
Fork 0
mirror of https://github.com/Lyxal/Keta.git synced 2024-08-14 23:53:13 +00:00

Update Patterns.md

This commit is contained in:
JonoCode9374 2019-12-26 13:44:29 +11:00 committed by GitHub
parent 9ba6b20aef
commit 3aa147c1b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,34 @@
# Different Block Patterns # Different Block Patterns
This is a list of how patterns are evaluated within Ket (ekg)
Nilads: N n Ñ ñ --> Nilads
Singles: S s Š ś --> Monads
Infixes: I i Ī ī --> Dyads
L L* L& L! --> Left argument -- implicit/whatever is to the left
R R* R& R! --> Right argument -- implicit/whatever is to the left
`{...}` means that the expressions are blocked together
`ND` -> `N I R`
`SN` -> `S(N)`
`Ss` -> `S(s(R))`
`SI` -> `S(R) I R*`
`IN` -> `L I S`
`IS` -> `L I S(R*)`
`Ii` -> `{L I R} i R*`
`SNs` -> `S(N)s(R)`
`SNI` -> `S(N) I R`
`SsN` -> `S(s(N))`
`SsŠ` -> `S(s(Š(R)))`
`SsI` -> `S(s(R)) I R*`
`SIN` -> `S(R) I N`
`SIs` -> `S(R) I s(R*)`
`SIi` -> `S(R) I {L* i R*}`
`INS` -> `L I N S(*R)`
|Arities|Result|
|-------|------|
|`1,2,1`|`Dyad(Monad1(Arg), Monad2(Arg))`|
|`0,1`|`Monad(Nilad)`|
|`0,2,0`|`Dyad(Nilad1, Nilad2)`|