3 ms·
> A parser reads an array of tokens and spits out a tree. [...] A parser need not perform I/O -- it need not "read" the tokens. It can function with just norm
by cryptonector 3y ago
> A parser reads an array of tokens and spits out a tree. [...]
A parser need not perform I/O -- it need not "read" the tokens. It can function with just normal function arguments only -- it can be pure.
- alexvitkov 3y ago"Read" does not imply I/O, you "read" from memory as well
- cryptonector 3y agoThe distinction is important. "Reading from memory" (function arguments) is pure, but doing I/O is not. A pure parser can be a functor, while one that does I/O not so much.