Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First clause for the maybe_pick_one/2 predicate seems redundant #1

Open
pmoura opened this issue Aug 14, 2018 · 1 comment
Open

First clause for the maybe_pick_one/2 predicate seems redundant #1

pmoura opened this issue Aug 14, 2018 · 1 comment

Comments

@pmoura
Copy link

pmoura commented Aug 14, 2018

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.

@Anniepoo
Copy link

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::

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants