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

Add a function to create Set and Map with a single member #128

Open
heueristik opened this issue Oct 16, 2024 · 0 comments
Open

Add a function to create Set and Map with a single member #128

heueristik opened this issue Oct 16, 2024 · 0 comments

Comments

@heueristik
Copy link

heueristik commented Oct 16, 2024

Currently, one needs to use Set.fromList [member] to create a set with a single member.

Add another constructor, allowing to create sets with a single member.

singleton {A} {{Ord A}} (a : A) : Set A := Set.insert a Set.empty;

Do the same for Map as well

@heueristik heueristik changed the title Add a function to create a set with a single member Add a function to create Set and Map with a single member Oct 16, 2024
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