My thought was that someone might still want a 1-ref.ss that provides
things "the reference implentation way", for portability. (i.e. i was
unsure if the "polymorpic" token in the mzlib/list.ss definitions
caused any compatibility issues with the reference
implementation). Personally changing srfi/1/selector.ss is fine
with me too.<br>
<br>
<br>
I guess the next question is, is any of the srfi functionality missing
in the mzlib/list.ss functions? for example, srfi-1 specs that
infintie lists are allowed to be passed to map, <br>
<br>
<br>
----<br>
I think it'd go something like:<br>
{i didn't get to test this one, I wrote it directly as a patch}<br>
<br>
<br>
*** selector.ss.orig Thu Apr 13 16:03:25 2006<br>
--- selector.ss Thu Apr 13 16:04:20 2006<br>
***************<br>
*** 37,42 ****<br>
--- 37,45 ----<br>
<br>
(require (lib "optional.ss" "srfi"))<br>
(require (lib "receive.ss" "srfi" "8"))<br>
+ (require (only (lib "list.ss" "mzlib") <br>
+ third fourth fifth sixth seventh eighth))<br>
+ <br>
<br>
(provide<br>
first second<br>
***************<br>
*** 54,63 ****<br>
<br>
(define first car)<br>
(define second cadr)<br>
! (define third caddr)<br>
! (define fourth cadddr)<br>
! (define (fifth x) (car (cddddr x)))<br>
! (define (sixth x) (cadr (cddddr x)))<br>
! (define (seventh x) (caddr (cddddr x)))<br>
! (define (eighth x) (cadddr (cddddr x)))<br>
(define (ninth x) (car (cddddr (cddddr x))))<br>
--- 57,66 ----<br>
<br>
(define first car)<br>
(define second cadr)<br>
! ; (define third caddr)<br>
! ; (define fourth cadddr)<br>
! ; (define (fifth x) (car (cddddr x)))<br>
! ; (define (sixth x) (cadr (cddddr x)))<br>
! ; (define (seventh x) (caddr (cddddr x)))<br>
! ; (define (eighth x) (cadddr (cddddr x)))<br>
(define (ninth x) (car (cddddr (cddddr x))))<br>
<br><br>
<br>
Corey<br>
<br><div><span class="gmail_quote">On 4/13/06, <b class="gmail_sendername">Robby Findler</b> <<a href="mailto:robby@cs.uchicago.edu">robby@cs.uchicago.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It also seems to make sense to have collects/srfi/1/selector.ss<br>re-export (lib "list.ss")'s definitions instead of defining its own.<br>Did you consider that one?<br><br>Robby<br><br>At Thu, 13 Apr 2006 13:56:37 -0500, "Corey Sweeney" wrote:
<br>> Ok, I took a look, and obviously "mzlib/list.ss" can't be missing any of the<br>> srfi functionality for these functions, so i propose starting with the<br>> following changes:<br>><br>> copy srfi/1.ss to srfi/1-
ref.ss<br>><br>><br>><br>> *** /home/corey/1.ss Thu Apr 13 13:49:27 2006<br>> --- /home/corey/1.ss.orig Thu Apr 13 13:41:02 2006<br>> ***************<br>> *** 1,13 ****<br>> ;; module loader for SRFI-1
<br>> (module |1| mzscheme<br>><br>> ! (require (all-except (lib "list.ss" "srfi" "1")<br>>
! third
fourth fifth sixth))<br>> ! (require (only (lib "list.ss" "mzlib")<br>> ! third fourth fifth sixth))<br>><br>> ! (provide third fourth fifth sixth<br>> ! (all-from-except (lib "
list.ss" "srfi" "1")<br>> s:append!
s:reverse!<br>> s:map s:for-each<br>> s:member<br>> --- 1,9 ----<br>> ;; module loader for SRFI-1<br>> (module |1| mzscheme<br>><br>> ! (require (lib "list.ss
" "srfi" "1"))<br>><br>> ! (provide (all-from-except (lib "list.ss" "srfi" "1")<br>> s:append!
s:reverse!<br>> s:map s:for-each<br>> s:member<br>><br>><br>> On 4/13/06, Corey Sweeney <<a href="mailto:corey.sweeney@gmail.com">corey.sweeney@gmail.com</a>> wrote:
<br>> ><br>> ><br>> ><br>> > On 4/12/06, Danny Yoo <<a href="mailto:dyoo@hkn.eecs.berkeley.edu">dyoo@hkn.eecs.berkeley.edu</a>> wrote:<br>> > ><br>> > ><br>> > ><br>
> > > and not see conflicts. And we can go the extra step and put the srfi-1<br>> > > functions into my-big-language as well. This does pretty much what<br>> > > you're<br>> > > planning earlier, except we avoid touching
plt-pretty-big-text.ss .<br>> ><br>> ><br>> > Agreed<br>> ><br>> > (Aside: I feel really cheesy about doing a copy-and-paste here; is there a<br>> > > nicer way to do this?)<br>> >
<br>> ><br>> > Well one way would be to make mzlib/list.ss just require then provide it's<br>> > functions from list.ss. However if mzlib/list.ss has some advantage over<br>> > srfi/1/list.ss , (performance?) then we could have srfi/1/list.ss require
<br>> > those functions that are in mzlib/list.ss , and are not extended by<br>> > srfi/1/list.ss , and then require/provide just those functions that have<br>> > extended functionality into mzlib/list.ss .
<br>> ><br>> > By the way, what is the advantage of the functions writen in mzlib/list.ss<br>> > that are also in srfi/1/list.ss?<br>> ><br>> ><br>> > Corey<br>> ><br>> ><br>
> ><br>> > Best of wishes!<br>> > ><br>> ><br>> ><br>> ><br>> > --<br>> > ((lambda (y) (y y)) (lambda (y) (y y)))<br>> ><br>><br>><br>><br>> --<br>> ((lambda (y) (y y)) (lambda (y) (y y)))
<br>> _________________________________________________<br>> For list-related administrative tasks:<br>> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme
</a><br></blockquote></div><br><br clear="all"><br>-- <br>((lambda (y) (y y)) (lambda (y) (y y)))