Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inspect functions after definition
1 participant