Hello,
My queue library has this record type:
(define-record-type queue (fields L R P))
And if you look at the rest of the library, there's a whole lotta
deconstructing going on. I.e.
(define (queue-empty? q)
(let ((L (queue-L q))
(R (queue-R q))
(P (queue-P q)))
(and (stream-null? L)
(stream-null? R)
(stream-null? P))))
I'd like for it to just be:
(define (queue-empty? (record queue L R P))
(and (stream-null? L)
(stream-null? R)
(stream-null? P)))
I.e. let 'define' do the deconstructing for me.
It would be even more concise if there were literal syntax for records:
(define (queue-empty? #queue(L R P))
(and (stream-null? L)
(stream-null? R)
(stream-null? P)))
If anybody has something like this, lemme know!
Of course, support for lists and vectors would be in order too. I.e.:
(lambda ((a b c)) ...)
expects a list of three elements and
(lambda (#(a b c))
expects a vector of three elements, etc.
Ed