SWI-Prolog-Education/talespin-annie

First clause for the `maybe_pick_one/2` predicate seems redundant

pmoura opened this issue · 1 comments

maybe_pick_one([], _) :- !, fail.

If the predicate is called with the first argument being an empty list, the call will fail without requiring the first clause as the other two clauses unify the first argument with a non-empty list.

Hmm... may be vestigial from debug, or I could just be an evil person who puts extra clauses in.

I tend to write expressively and then bodge when I have to for performance.

8c/ ::Annie is here, wondering if this was evil::