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

Pretty print function definition #252

Merged
merged 1 commit into from
Mar 4, 2021
Merged

Pretty print function definition #252

merged 1 commit into from
Mar 4, 2021

Conversation

sharkdp
Copy link
Owner

@sharkdp sharkdp commented Mar 3, 2021

This adds a new statement to the Insect language that allows
users to pretty-print a function definition by simply typing
the name of the function:

>>> f(x, y) = cos(x) + y^2

  f(x, y) = cos(x) + y^2

>>> f

  f(x, y) = cos(x) + y^2

>>> cos

  cos(x) = builtin function

>>> atan2

  atan2(x, y) = builtin function

>>> mean

  mean(x1, x2, …) = builtin function

closes #251

This adds a new statement to the Insect language that allows
users to pretty-print a function definition by simply typing
the name of the function:

    >>> f(x, y) = cos(x) + y^2

      f(x, y) = cos(x) + y^2

    >>> f

      f(x, y) = cos(x) + y^2

    >>> cos

      cos(x) = builtin function

    >>> atan2

      atan2(x, y) = builtin function

    >>> mean

      mean(x1, x2, …) = builtin function

closes #251
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

Successfully merging this pull request may close these issues.

Inspect functions after definition
1 participant