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

introduce curried form for startswith and endswith #35032

Closed
oxinabox opened this issue Mar 6, 2020 · 1 comment
Closed

introduce curried form for startswith and endswith #35032

oxinabox opened this issue Mar 6, 2020 · 1 comment

Comments

@oxinabox
Copy link
Contributor

oxinabox commented Mar 6, 2020

For some functions, E.g.

  • in(item, collection) where have in(collection) = item -> in(item, collection)
  • lessthan(a, b) we have lessthan(b) = a -> lessthan(a, b)
  • isequal(a, b) we have isequal(b) = a -> isequal(a, b)

We have a whole bunch of these implemented via Base.Fix2.
They are useful for using with filter.

I propose we add a few more:

  • startswith(haystack, needle) giving startswith(needle) -> startswith(haystack, needle)
  • endswith(haystack, needle) giving endswith(needle) -> endswith(haystack, needle)

This is part of a series of issues relating to invenia/Wrangling.jl#3
Will link others below for cross referencing.
and removing its type-piracy
#35031
#35033

@KristofferC
Copy link
Member

Dup of #33193

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

2 participants