You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/dialects.md
-15Lines changed: 0 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,21 +23,6 @@
23
23
24
24
# Examples of creating dialects using `mcpyrate`
25
25
26
-
What if Python had automatic tail-call optimization and an implicit return statement? Look no further:
27
-
28
-
```python
29
-
from unpythonic.dialects import dialects, Lispython # noqa: F401
30
-
31
-
deffactorial(n):
32
-
deff(k, acc):
33
-
if k ==1:
34
-
return acc
35
-
f(k -1, k * acc)
36
-
f(n, acc=1)
37
-
assert factorial(4) ==24
38
-
factorial(5000) # no crash
39
-
```
40
-
41
26
The [dialects subsystem of `mcpyrate`](https://github.com/Technologicat/mcpyrate/blob/master/doc/dialects.md) makes Python into a language platform, à la [Racket](https://racket-lang.org/).
42
27
It provides the plumbing that allows to create, in Python, dialects that compile into Python
43
28
at macro expansion time. It is geared toward creating languages that extend Python
0 commit comments