[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Scheme-reports] How about relaxing a dot notation restriction?
- To: scheme-reports@x
- Subject: [Scheme-reports] How about relaxing a dot notation restriction?
- From: Sascha Ziemann <ceving@x>
- Date: Fri, 22 Mar 2013 14:06:26 +0100
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@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports