concept context - sensitive parser in category functional programming
appears as: context-sensitive parser, context-sensitive parsers

This is an excerpt from Manning's book Functional Programming with Kotlin.
Using
flatMapand any other combinators, write the context-sensitive parser we couldn’t express earlier. The result should be aParser<Int>that returns the number of characters read. You can make use of a new primitive calledregexto parse digits, which promotes a regular expressionStringto aParser<String>.