source: project/release/4/remote-mailbox/trunk/remote-mailbox-packet.scm @ 35329

Last change on this file since 35329 was 35329, checked in by kon, 13 months ago

add types, deprecate '/' style identifiers, use moremacros define-warning-parameter, reflow

File size: 704 bytes
Line 
1;;;; remote-mailbox-packet.scm
2;;;; Kon Lovett, Sep '17
3
4(module remote-mailbox-packet
5
6(;export
7  ;;
8  make-remote-mailbox-packet
9  remote-mailbox-packet?
10  remote-mailbox-packet-key
11  remote-mailbox-packet-value )
12
13(import scheme chicken)
14
15;;; Remote Mailbox Packet
16
17(define +remote-mailbox-tag+ 'rmbtag)
18
19(define (make-remote-mailbox-packet key val)
20  (vector +remote-mailbox-tag+ key val) )
21
22(define (remote-mailbox-packet? obj)
23        (and
24          (vector? obj)
25    (fx= 3 (vector-length obj))
26    (eq? +remote-mailbox-tag+ (vector-ref obj 0))) )
27
28(define (remote-mailbox-packet-key rmp)
29  (vector-ref rmp 1) )
30
31(define (remote-mailbox-packet-value rmp)
32  (vector-ref rmp 2) )
33
34) ;module remote-mailbox-packet
Note: See TracBrowser for help on using the repository browser.