You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that lambdas may have docstrings included as their first expression, as in Common Lisp and Emacs Lisp:
(defineg (lambda () "one" -1))
lips> (help g)
one
But define may also include docstrings, as an extra argument:
lips> (definex 10 "two")
lips> (help x)
two
But... Then I cold also try to include a docstring inside a lambda, and define it as the value of a a variable with a different docstring:
lips> (definef (lambda () "some docstring" -1) "a different docstring")
lips> (help f)
some docstring
Perhaps a warning could be issued in this case? When defining f, LIPS could warn the user that "the value is a procedure that already has a docstring"?
The text was updated successfully, but these errors were encountered:
Hello!
I see that lambdas may have docstrings included as their first expression, as in Common Lisp and Emacs Lisp:
But define may also include docstrings, as an extra argument:
But... Then I cold also try to include a docstring inside a lambda, and define it as the value of a a variable with a different docstring:
Perhaps a warning could be issued in this case? When defining
f
, LIPS could warn the user that "the value is a procedure that already has a docstring"?The text was updated successfully, but these errors were encountered: