JohnEarnest / ok

An open-source interpreter for the K5 programming language.
MIT License
587 stars 72 forks source link

manual.md should say that #[a:3;b:17] yields 2 #42

Closed jordancurve closed 4 years ago

jordancurve commented 8 years ago

manual.md says that #[a:3;b:17] yields 17 17 17, but it actually yields 2.

JohnEarnest commented 8 years ago

Looks like a regression. That particular example is problematic because it demonstrates potential parse ambiguity between dyadic function application and monadic application to a dictionary literal. Observe how whitespace impacts behavior in the official k5 interpreter:

 #[a:3;b:17]
17 17 17

 # [a:3;b:17]
2