Get the latest tech news
I'm not mutable, I'm partially instantiated
Incomplete data structures challenge our notion of mutability
The cut is necessary ... because of the nonlogical nature of comparison operators, which will give errors if keys are not instantiated. This version uses a single rule, with an if/then control structure to avoid leaving behind choicepoints, since we know each key in the dictionary is unique. This is a newer predicate which uses Prolog’s standard order so keys can be strings, atoms, numbers, it doesn’t matter.
Or read this on Hacker News