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

predicate combinators: and_p and or_p #458

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

benbellick
Copy link
Contributor

No description provided.

@c-cube
Copy link
Owner

c-cube commented Aug 26, 2024

should these perhaps be called compose_and and compose_or, as they're specialized version of compose_binop?

@benbellick
Copy link
Contributor Author

Unless I am not understanding, it doesn't seem like a specialized version of compose_binop, as in compose_binop, the inside is the same function f applied to two terms x and y, whereas in and_p and or_p, the inside is two different functions f and g being applied to the same term x.

@c-cube
Copy link
Owner

c-cube commented Aug 29, 2024

Fair enough, there could be a compose_binop_maxi f g1 g2 x y = f (g1 x) (g2 y) that is actually a generalization of both. But my bad :). I'd still like a more descriptive name?

@benbellick
Copy link
Contributor Author

The p I meant to evoke predicate, so how about and_pred or and_predicate?

@c-cube
Copy link
Owner

c-cube commented Sep 3, 2024

Sure, let's go with and_pred :)

@benbellick
Copy link
Contributor Author

Done!

@c-cube c-cube merged commit 5abb635 into c-cube:main Sep 3, 2024
6 of 7 checks passed
@c-cube
Copy link
Owner

c-cube commented Sep 3, 2024

thanks! :)

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

Successfully merging this pull request may close these issues.

2 participants