Changeset 13530 in project


Ignore:
Timestamp:
03/06/09 07:05:31 (11 years ago)
Author:
Kon Lovett
Message:

Added %queue?

Location:
release/4/mailbox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/mailbox/tags/2.0.0/mailbox.scm

    r13529 r13530  
    3939  (%make-structure 'queue '() '()))
    4040
     41(define-inline (%queue? obj)
     42  (%structure-instance? obj 'queue) )
     43
    4144(define-inline (%queue-first-pair q)
    4245  (%structure-ref q 1) )
     
    5154  (%structure-set! q 2 v) )
    5255
     56(define-inline (%queue-empty? q)
     57  (%null? (%queue-first-pair q)) )
     58
     59(define-inline (%queue-count q)
     60  (%length (%queue-first-pair q)) )
     61
     62;; Queue Operations
     63
    5364(define-inline (%queue-last-pair-empty! q)
    5465  (%structure-set!/immediate q 2 '()) )
    55 
    56 (define-inline (%queue-empty? q)
    57   (%null? (%queue-first-pair q)) )
    58 
    59 (define-inline (%queue-count q)
    60   (%length (%queue-first-pair q)) )
    61 
    62 ;; Queue Operations
    6366
    6467(define-inline (%queue-add! q datum)
  • release/4/mailbox/trunk/mailbox.scm

    r13529 r13530  
    3939  (%make-structure 'queue '() '()))
    4040
     41(define-inline (%queue? obj)
     42  (%structure-instance? obj 'queue) )
     43
    4144(define-inline (%queue-first-pair q)
    4245  (%structure-ref q 1) )
     
    5154  (%structure-set! q 2 v) )
    5255
     56(define-inline (%queue-empty? q)
     57  (%null? (%queue-first-pair q)) )
     58
     59(define-inline (%queue-count q)
     60  (%length (%queue-first-pair q)) )
     61
     62;; Queue Operations
     63
    5364(define-inline (%queue-last-pair-empty! q)
    5465  (%structure-set!/immediate q 2 '()) )
    55 
    56 (define-inline (%queue-empty? q)
    57   (%null? (%queue-first-pair q)) )
    58 
    59 (define-inline (%queue-count q)
    60   (%length (%queue-first-pair q)) )
    61 
    62 ;; Queue Operations
    6366
    6467(define-inline (%queue-add! q datum)
Note: See TracChangeset for help on using the changeset viewer.