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

Feature Idea: Implicitly split sequences to fulfill arity #249

Open
fortraan opened this issue Apr 18, 2018 · 0 comments
Open

Feature Idea: Implicitly split sequences to fulfill arity #249

fortraan opened this issue Apr 18, 2018 · 0 comments

Comments

@fortraan
Copy link

For example, in this code golf, what was previously s.lF or s.lhQe would become s.l.

Another example: Trying to replace every matching substring with another substring
Code:

:Q

Inputs and Outputs:

"foo bar", "ba.", "baz" ---> foo baz
"var a = true", "true", "false" ---> var a = false
"yeeeeeees pleeeeeaseee", "e+", "e" ---> yes please

The input would be evaluated to a string list of length 3. The : operator, when supplied 3 arguments,
is regex match-and-replace. Since it's a list, Q would be implicitly expanded to @Q0@Q1@Q2. In other words,

:Q

would be equivalent to

:@Q0@Q1@Q2
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