JohnEarnest / ok

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

Cannot find in a dictionary #71

Closed lkowalick closed 7 years ago

lkowalick commented 7 years ago

While I don't have an interpreter to test with, I was wondering if

  (`a`b`c!0 1 1)?1
number expected, found dictionary.

is a bug or find on dictionaries is not implemented in k5/ok. In k4, we get

  (`a`b`c!0 1 1)?1
`b
JohnEarnest commented 7 years ago

Interesting. Hadn't thought to try that. Looks like Arthur went back and forth on this. In k5:

2015.04.05 (c) arthur whitney
 (`a`b`c!0 1 1)?1
`b

In k6,

2016.12.02 (c) arthur whitney

 (`a`b`c!0 1 1)?1
(`a`b`c!0 1 1)?1
              ^
dict error