A Parser helps turn a string into nicely structured data. For example, we can run the int parser to turn a string into a number:
Parser
string
number
run(int)("123456") // => Ok 123456 run(int)("3.1415") // => Err ...
The cool thing is that you can combine Parser values to handle much more complex scenarios.
A
Parser
helps turn astring
into nicely structured data. For example, we can run the int parser to turn astring
into anumber
:The cool thing is that you can combine
Parser
values to handle much more complex scenarios.