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

Anonymous Predicates #2884

Closed
wants to merge 1 commit into from

Conversation

Capital-EX
Copy link
Contributor

A draft PR for adding an anonymous version of predicate classes to Factor. Currently dispatch is not working correctly. Currently it seems the predicate is ignored by dispatch. Additionally, anonymous predicates are not supported in the class algebra.

What I have currently is enough to avoid raising an exception when using M: predicate{ class [ pred ] } method.

@mrjbq7
Copy link
Member

mrjbq7 commented Oct 13, 2023

What do you think of predicate{ fixnum [ 0 > ] } vs predicate{ fixnum 0 > }

@Capital-EX
Copy link
Contributor Author

I'm indifferent to having the [ ] or ditching them. They are mostly there because it made implementing <anonymous-predicate> feel more straight forward.

@mrjbq7
Copy link
Member

mrjbq7 commented Oct 13, 2023

Why is rank-class set to 1.5?

@Capital-EX
Copy link
Contributor Author

Why is rank-class set to 1.5?

Temporary thing because I didn't want to change all the class ranks until I figured out how to integrate into the class algebra. All anonymous classes rank above their respective onymous classes, so I just used 1.5 to place it between tuple-class and predicate-class.

There wasn't anything say I couldn't use a float so I just threw it in there.

@mrjbq7
Copy link
Member

mrjbq7 commented Oct 13, 2023

Merged, thanks!

We might want to change 1.5 to something else later, but seems to work.

@mrjbq7 mrjbq7 closed this Oct 13, 2023
@Capital-EX Capital-EX deleted the anonymous-predicates branch November 4, 2023 15:15
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.

None yet

2 participants