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

miniKanren day-2 #94

Open
zzz6519003 opened this issue Apr 16, 2017 · 0 comments
Open

miniKanren day-2 #94

zzz6519003 opened this issue Apr 16, 2017 · 0 comments

Comments

@zzz6519003
Copy link
Owner

zzz6519003 commented Apr 16, 2017

A common feature of functional programming languages is pattern matching,

matche is a pattern matching version of conde that makes this kind of code
much more clear and concise.

Pattern matching has reduced the function to its essence.

The answer is that unlike Clojure, which doesn’t require you to destructure every key, core.logic map patterns must match exactly.

Bringing maps and partial maps into logic programming makes expressing many kinds of problems much clearer.
You might ask why featurec is not featureo. The simple answer is that it’s not a relation.

condu works similarly to conda, except that instead of limiting solutions to a single branch, it stops completely after a single solution is found.

Which kind of conditional you choose depends on what you’re trying to do. If you’re not sure which to use, start with conde.

@zzz6519003 zzz6519003 changed the title 4 miniKanren day-2 Apr 17, 2017
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

1 participant