explicitly state that it is an error if the default values mutate the let-optionals list (issue #778)

This commit is contained in:
Alex Shinn 2021-08-30 16:15:57 +09:00
parent 22e89b168a
commit 08d2847767

View file

@ -28,6 +28,9 @@
;;> elements of \var{ls} beyond the length of \var{ls}, otherwise any ;;> elements of \var{ls} beyond the length of \var{ls}, otherwise any
;;> extra values are unused. ;;> extra values are unused.
;;> ;;>
;;> \var{ls} is evaluated only once. It is an error if any
;;> \var{default} mutates \var{ls}.
;;>
;;> Typically used on the dotted rest list at the start of a lambda, ;;> Typically used on the dotted rest list at the start of a lambda,
;;> \scheme{let-optionals} is more concise and more efficient than ;;> \scheme{let-optionals} is more concise and more efficient than
;;> \scheme{case-lambda} for simple optional argument uses. ;;> \scheme{case-lambda} for simple optional argument uses.