85
Parse, don’t validate
(lexi-lambda.github.io)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
A list can store zero or more elements. A
NonEmpty
can store one or more element. That's all.This overall strategy -- representing the top of a list as a dedicated value -- shows up elsewhere, notably in Forths, where it is called "top of stack" and often stored in a dedicated CPU register.