Comment

Comment by antononcube

It seems you are describing how functional parsers (aka parser combinators) work.

(BTW, there is a "Parser combinators" section in the featured post/article.)

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton