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
Parserhelps turn astringinto nicely structured data. For example, we can run the int parser to turn astringinto anumber:The cool thing is that you can combine
Parservalues to handle much more complex scenarios.