Eduardo Cavazos wrote:
>> 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.
Tristan Ravitch wrote:
I don't quite have a destructuring define, but I did make a
destructuring bind macro. You can check it out here:
http://pages.cs.wisc.edu/~travitch/cynara.tar.gz
Wow, this is very nice! I'm glad I asked! Thanks!
queue-empty? using bind is:
(define (queue-empty?* q)
(bind (((&record L R P) q))
(and (stream-null? L)
(stream-null? R)
(stream-null? P))))
Ed