On Thu, 2010-12-16 at 23:42 -0800, Per Bothner wrote:

> 
> For example this would be mis-parsed in an unexpected manner:
>    (lambda (x y) (list y x))
> 
> My definition *is* (I believe) compatible (i.e. a super-set) of traditional
> lambda.

But it still allows for only one pattern rule. Why not have:

(lambda (x y) (list y x)
      | (x y z) (list z y x))

or, with arrows (and guards):

(lambda (x y) ! (> x 1) => (list y x)
      | (x y) ! otherwise => (list x y))

This makes additional sense if guards are to be included (using either
"when", "where" or "!" for the guard keyword, and "otherwise" for #t).

or, by auto-quoting behind ->:

(lambda (x y) ! (> x 1) -> (,y ,x)
      | (x y) ! otherwise -> (,x ,y))

All of these variations can be made to work on top of original lambda 
as extensions, I believe.

Pjotr


_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to