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:
parent
9ba6b20aef
commit
3aa147c1b9
1 changed files with 32 additions and 5 deletions
37
Patterns.md
37
Patterns.md
|
@ -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)`|
|
|
||||||
|
|
Loading…
Reference in a new issue