[Scheme-reports] How about relaxing a dot notation restriction? Sascha Ziemann (22 Mar 2013 18:34 UTC)
Re: [Scheme-reports] How about relaxing a dot notation restriction? taylanbayirli@gmail.com (22 Mar 2013 20:27 UTC)

[Scheme-reports] How about relaxing a dot notation restriction? Sascha Ziemann 22 Mar 2013 13:06 UTC

Hello,

the dot notation is allowed in function definitions:

(define (plus first . rest)
  (if (null? rest)
      first
      (+ first (apply plus rest))))

(plus 1 2 3) => 6

And in literals:

(plus 1 . (2 3)) => 6

But not in function applications:

(define two-three '(2 3))
(plus 1 . two-three) => ERROR

How about relaxing this restriction?

Regards
Sascha

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports