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

The form (= ...) is used in LFE #1

Open
oubiwann opened this issue Aug 7, 2015 · 1 comment
Open

The form (= ...) is used in LFE #1

oubiwann opened this issue Aug 7, 2015 · 1 comment

Comments

@oubiwann
Copy link

oubiwann commented Aug 7, 2015

Hey man,

Just wanted to give a heads-up: the form (= ...) is used in LFE when pattern matching; it allows one to set the whole data structure being matched to a value while still matching parts of it to other variables.

Maybe (unif ...)? I haven't spent enough time with The Reasoned Schemer to offer a good alternative ...

@pzel
Copy link
Owner

pzel commented Aug 12, 2015

Yeah, originally that operator was called equalo, but it felt somehow off, because it had the name of a relation (non-primitive) while actually being the basic language primitive.

My line of thinking was that since µKanren is a DSL, then it's OK to shadow host language constructs while 'inside' the DSL, so to speak.

It sems that prolog uses the ?- operator for unification. I'm willing to forgo = (despite its elegance and adherence to mini-/mircoKanren syntax), but let's think a while about a good replacement. (Too bad can't be typed easily on the keyboard..)

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