Hacker News new | ask | show | jobs
by inopinatus 2374 days ago
or solution: Null Object

or a whole value

or use an enumerator

or a collection decorator

All of which are simple solutions already available. No need to import every new paradigm hammer in the hope that everything is a nail.