try modifier in apply,select,etc
Nobody has claimed this yet.
- Dominant language
- Macaulay2
- Stars
- 435
- Forks
- 297
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 11
Description
Not long ago we added support for something like:
```m2
i6 : select(-5..5, even and not zero)
o6 = (-4, -2, 2, 4)
```
Which is pretty nice. Basically `not Function` and `Function and Function` return a function that negate the output or and the outputs.
Would be neat if this was also supported:
```m2
apply(10, try myfunc)
```
Maybe this is not feasible because there's an actual double meaning here, in which case case I'm happy to close this.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing behavior for `not Function` and `Function and Function`, then examine how the `apply` and `select` entry points handle function arguments. Define whether `try myfunc` has an unambiguous meaning, implement support only if the semantics are clear, and verify the supplied `apply(10, try myfunc)` example.
Written by the indexing model from the issue text.
Assessment
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100