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

feat: add KMP frontend for lists #1065

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

Conversation

fgdorais
Copy link
Collaborator

No description provided.

@fgdorais fgdorais added the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label Nov 25, 2024
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 25, 2024
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Nov 25, 2024

Mathlib CI status (docs):

@kim-em
Copy link
Collaborator

kim-em commented Nov 25, 2024

I know this would be revising stuff that already exists, but could we have an API whereby one doesn't ever need to see Matcher, in the common case of just doing a single lookup?

(Perhaps there could be a function directly on List, that takes on optional Matcher argument, with default value that constructs the Matcher?)

@fgdorais
Copy link
Collaborator Author

I'm not sure what these would return. Unlike String there is no Sublist type to work with.

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 25, 2024
@fgdorais
Copy link
Collaborator Author

I added the same functions as for strings.

@kim-em
Copy link
Collaborator

kim-em commented Nov 25, 2024

Great, thanks. I'm happy with those.

A naming question, however: List.Sublist already means not-necessarily-contiguous sublist, whereas we use the word "infix" for contiguous sublists. How would you feel about changing the List parts of the API to be consistent with this? (While leaving the String API in terms of Substring, and Array API in terms of Subarray of course.)

leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Nov 25, 2024
@fgdorais
Copy link
Collaborator Author

Names changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-review This PR is ready for review; the author thinks it is ready to be merged. builds-mathlib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants