pyret-lang
pyret-lang copied to clipboard
The Pyret language.
Bottom of [A Tour of Pyret](https://www.pyret.org/docs/latest/A_Tour_of_Pyret.html#%28part._functions-tour%29) has a code block demonstrating `when`, but which is missing a `block`.
If I want to write `````` words = string-split-all(``` word1 word2 word3 ```, "\n") `````` the indenter turns this into `````` words = string-split-all(``` word1 word2 word3 ```, "\n") ``````...
Possibly an extension of #1602. Code: https://code.pyret.org/editor#share=1ML0EdMGdi5Z0iBJ0IMUg9-u6VQ4e1tR2&v=1904b2c If the inner-most body is a `cases`, then we get that `b` is a `ref` on line 19, but if the body is...
This pull request addresses #1627, in which I was getting strange bugs on a particular character. Currently `tokenizeFrom` normalizes the given source string to Unicode Normalization Form C, then stores...
The character 𢡊 produces a lot of strange behavior with Pyret. For example, the program ``` #|𢡊|# ``` causes an "internal error", while the program ``` string-length("𢡊")) ``` (note mismatched...
I've been trying different ways to extend values produced by constructors but I can't seem to make it work.. My latest attempt with a function that should produce a subtype:...
This program ``` data Box: | box(ref v) end b-circ = box("empty") b-circ!{v: b-circ} b-circ.v ``` prints Is there really a need to print different strings?
List `filter` is not currently enforcing that function passed in is a predicate (that is, return a `Boolean` value). Instead, it seems to rely on JavaScript raw list filter which...
It would seem that aliasing built-in types (with the type-stmt `type`) leads to an error message in the REPL — but only if the aliased type is not parameterized. One...
In a new CPO instance (with `use context essentials2021` showing on the left), go to the REPL and type `take`; you get an unbound identifier error. But click run (in...