[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mixed parameters in formals

This page is part of the web mail archives of SRFI 89 from before July 7th, 2015. The new archives for SRFI 89 contain all messages, not just those from before July 7th, 2015.



The following are examples in SRFI-89:

    (define (h2 [key: k #f] a . r) (list a k r))

    (h2 7)                 ==>  (7 #f ())
    (h2 7 8 9 10)          ==>  (7 #f (8 9 10))
    (h2 key: 8 9 10)       ==>  (9 8 (10))
    (h2 key: 8 zoo: 9)     ==>  error

1. If we make the required positional variable `a' to take a keyword
   object as its value, is it possible?

2. I don't know what the `positional' of `required positional' means.
   (h2 [key: k #f] a . r) --> the second parameter
   (h2 7 8 9 10)	  --> the first actual argument
   (h2 key: 8 9 10)	  --> the third actual argument

--
Joo ChurlSoo