tsoding / tula

Turing Language
MIT License
164 stars 2 forks source link

Wrong example output in README #4

Closed BrunoPanizzi closed 3 months ago

BrunoPanizzi commented 3 months ago

Under the section about "Sets and Universal Quantification", there is an example about nested quantifiers:

let Set { a b c }
for n in Set
for m in Set
case (S n) m 0 -> S

The above expands to this:

case (S a) a a -> S
case (S a) b a -> S
case (S a) c a -> S
case (S b) a b -> S
case (S b) b b -> S
case (S b) c b -> S
case (S c) a c -> S
case (S c) b c -> S
case (S c) c c -> S

But the expanded result doesn't match the code, either the 0 in the code should be changed to n or the expanded version should be changed. Personally I think the first option makes more sense with the example.

rexim commented 3 months ago

Thank you for catching the mistake!