Skip to content

Add an argset chainer #11

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

Open
wants to merge 81 commits into
base: main
Choose a base branch
from

Conversation

rTreutlein
Copy link

This is a chainer that works on functions that have a set as an argument while allowing for partial application.

This is a chainer that works on functions that have a set as an argument
while allowing for partial application.
Roman Treutlein added 28 commits February 1, 2025 16:07
@@ -0,0 +1,138 @@
import random

def random_subset(fact_list, min_count=0, max_count=1):
Copy link
Collaborator

@ngeiswei ngeiswei Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be interested to know that since 3.10, Python supports a rich type annotation language out-of-the-box.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but that file actually wasn't supposed to be in that folder. I just deleted it in the latest version. That also contains some minor fixes.


;; Define <=
(: <= (-> $a $a Bool))
(= (<= $x $y) (or (< $x $y) (== $x $y)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<= is in the standard library of MeTTa so you don't need to define it anymore.

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