Keta/Patterns.md

45 lines
1009 B
Markdown
Raw Permalink Normal View History

2019-12-24 23:49:02 +00:00
# Different Block Patterns
2020-01-17 11:29:27 +00:00
This is a list of how patterns are evaluated within Ket (ekg).
2019-12-26 02:44:29 +00:00
2019-12-26 02:52:57 +00:00
Nilads: N n Ñ --> Nilads
2019-12-26 02:53:19 +00:00
2019-12-26 02:52:57 +00:00
Singles: S s Š --> Monads
2019-12-26 02:53:19 +00:00
2019-12-26 02:52:57 +00:00
Infixes: I i Ī --> Dyads
2019-12-26 02:44:29 +00:00
2019-12-26 02:52:57 +00:00
L L* L& --> Left argument -- implicit/whatever is to the left
2019-12-26 02:53:19 +00:00
2019-12-26 02:52:57 +00:00
R R* R& --> Right argument -- implicit/whatever is to the left
2019-12-26 02:44:29 +00:00
`{...}` means that the expressions are blocked together
2019-12-26 02:45:16 +00:00
- `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*`
- `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*}`
2019-12-26 02:52:57 +00:00
- `INi` -> `{L I N} i R*`
- `ISN` -> `L I S(N)`
- `ISs` -> `L I S(s(R*))`
- `ISi` -> `{L D S(R*)} i R&`
- `IiN` -> `{L I R} i N`
- `IiS` -> `{L I R} i S(R*)`
2019-12-26 05:33:41 +00:00
- `IiĪ` -> `{{L I R} i R*} Ī R&`
2020-01-17 11:29:27 +00:00
Blocks are evaluated using the triplet rules if possible, otherwise the pair rules are used, otherwise expressions are evaluated as is.
2019-12-26 02:44:29 +00:00
2019-12-24 23:49:02 +00:00