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 Request] Function Definitions #33

Open
iamrecursion opened this issue Nov 13, 2023 · 1 comment
Open

[Feature Request] Function Definitions #33

iamrecursion opened this issue Nov 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@iamrecursion
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Sometimes I've found that I want to evaluate a given mathematical expression for a series of inputs. Right now, I end up writing out the expression with substitutions as necessary, but it would be great to be able to define an ad-hoc function that is then used.

Describe the solution you'd like
A way to define a function on a line such as def_solve(signature, expression) that can then be used on subsequent lines. The signature would be something like my_fn(a, b) and then I could use a and b in the expression.

Describe alternatives you've considered
Writing a provider, but this is very heavyweight for only locally-reusable things.

@iamrecursion iamrecursion added the enhancement New feature or request label Nov 13, 2023
@iamrecursion
Copy link
Contributor Author

This would have allowed me to define my own version of #31!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant