Artifact
c522fff51bc6738777fc445dff31822437641f5f:
- File
srfi/s99/records/helper.sls
— part of check-in
[80c8c83034]
at
2016-07-07 18:11:39
on branch trunk
— initial import
(user:
ovenpasta@pizzahack.eu
size: 1443)
0000: 3b 3b 20 43 6f 70 79 72 69 67 68 74 20 28 43 29 ;; Copyright (C)
0010: 20 57 69 6c 6c 69 61 6d 20 44 20 43 6c 69 6e 67 William D Cling
0020: 65 72 20 32 30 30 38 2e 20 41 6c 6c 20 52 69 67 er 2008. All Rig
0030: 68 74 73 20 52 65 73 65 72 76 65 64 2e 0a 3b 3b hts Reserved..;;
0040: 0a 3b 3b 20 50 65 72 6d 69 73 73 69 6f 6e 20 69 .;; Permission i
0050: 73 20 68 65 72 65 62 79 20 67 72 61 6e 74 65 64 s hereby granted
0060: 2c 20 66 72 65 65 20 6f 66 20 63 68 61 72 67 65 , free of charge
0070: 2c 20 74 6f 20 61 6e 79 20 70 65 72 73 6f 6e 20 , to any person
0080: 6f 62 74 61 69 6e 69 6e 67 20 61 20 63 6f 70 79 obtaining a copy
0090: 0a 3b 3b 20 6f 66 20 74 68 69 73 20 73 6f 66 74 .;; of this soft
00a0: 77 61 72 65 20 61 6e 64 20 61 73 73 6f 63 69 61 ware and associa
00b0: 74 65 64 20 64 6f 63 75 6d 65 6e 74 61 74 69 6f ted documentatio
00c0: 6e 20 66 69 6c 65 73 20 28 74 68 65 20 22 53 6f n files (the "So
00d0: 66 74 77 61 72 65 22 29 2c 20 74 6f 20 64 65 61 ftware"), to dea
00e0: 6c 0a 3b 3b 20 69 6e 20 74 68 65 20 53 6f 66 74 l.;; in the Soft
00f0: 77 61 72 65 20 77 69 74 68 6f 75 74 20 72 65 73 ware without res
0100: 74 72 69 63 74 69 6f 6e 2c 20 69 6e 63 6c 75 64 triction, includ
0110: 69 6e 67 20 77 69 74 68 6f 75 74 20 6c 69 6d 69 ing without limi
0120: 74 61 74 69 6f 6e 20 74 68 65 20 72 69 67 68 74 tation the right
0130: 73 0a 3b 3b 20 74 6f 20 75 73 65 2c 20 63 6f 70 s.;; to use, cop
0140: 79 2c 20 6d 6f 64 69 66 79 2c 20 6d 65 72 67 65 y, modify, merge
0150: 2c 20 70 75 62 6c 69 73 68 2c 20 64 69 73 74 72 , publish, distr
0160: 69 62 75 74 65 2c 20 73 75 62 6c 69 63 65 6e 73 ibute, sublicens
0170: 65 2c 20 61 6e 64 2f 6f 72 20 73 65 6c 6c 0a 3b e, and/or sell.;
0180: 3b 20 63 6f 70 69 65 73 20 6f 66 20 74 68 65 20 ; copies of the
0190: 53 6f 66 74 77 61 72 65 2c 20 61 6e 64 20 74 6f Software, and to
01a0: 20 70 65 72 6d 69 74 20 70 65 72 73 6f 6e 73 20 permit persons
01b0: 74 6f 20 77 68 6f 6d 20 74 68 65 20 53 6f 66 74 to whom the Soft
01c0: 77 61 72 65 20 69 73 0a 3b 3b 20 66 75 72 6e 69 ware is.;; furni
01d0: 73 68 65 64 20 74 6f 20 64 6f 20 73 6f 2c 20 73 shed to do so, s
01e0: 75 62 6a 65 63 74 20 74 6f 20 74 68 65 20 66 6f ubject to the fo
01f0: 6c 6c 6f 77 69 6e 67 20 63 6f 6e 64 69 74 69 6f llowing conditio
0200: 6e 73 3a 0a 3b 3b 0a 3b 3b 20 54 68 65 20 61 62 ns:.;;.;; The ab
0210: 6f 76 65 20 63 6f 70 79 72 69 67 68 74 20 6e 6f ove copyright no
0220: 74 69 63 65 20 61 6e 64 20 74 68 69 73 20 70 65 tice and this pe
0230: 72 6d 69 73 73 69 6f 6e 20 6e 6f 74 69 63 65 20 rmission notice
0240: 73 68 61 6c 6c 20 62 65 20 69 6e 63 6c 75 64 65 shall be include
0250: 64 20 69 6e 0a 3b 3b 20 61 6c 6c 20 63 6f 70 69 d in.;; all copi
0260: 65 73 20 6f 72 20 73 75 62 73 74 61 6e 74 69 61 es or substantia
0270: 6c 20 70 6f 72 74 69 6f 6e 73 20 6f 66 20 74 68 l portions of th
0280: 65 20 53 6f 66 74 77 61 72 65 2e 0a 3b 3b 0a 3b e Software..;;.;
0290: 3b 20 54 48 45 20 53 4f 46 54 57 41 52 45 20 49 ; THE SOFTWARE I
02a0: 53 20 50 52 4f 56 49 44 45 44 20 22 41 53 20 49 S PROVIDED "AS I
02b0: 53 22 2c 20 57 49 54 48 4f 55 54 20 57 41 52 52 S", WITHOUT WARR
02c0: 41 4e 54 59 20 4f 46 20 41 4e 59 20 4b 49 4e 44 ANTY OF ANY KIND
02d0: 2c 20 45 58 50 52 45 53 53 20 4f 52 0a 3b 3b 20 , EXPRESS OR.;;
02e0: 49 4d 50 4c 49 45 44 2c 20 49 4e 43 4c 55 44 49 IMPLIED, INCLUDI
02f0: 4e 47 20 42 55 54 20 4e 4f 54 20 4c 49 4d 49 54 NG BUT NOT LIMIT
0300: 45 44 20 54 4f 20 54 48 45 20 57 41 52 52 41 4e ED TO THE WARRAN
0310: 54 49 45 53 20 4f 46 20 4d 45 52 43 48 41 4e 54 TIES OF MERCHANT
0320: 41 42 49 4c 49 54 59 2c 0a 3b 3b 20 46 49 54 4e ABILITY,.;; FITN
0330: 45 53 53 20 46 4f 52 20 41 20 50 41 52 54 49 43 ESS FOR A PARTIC
0340: 55 4c 41 52 20 50 55 52 50 4f 53 45 20 41 4e 44 ULAR PURPOSE AND
0350: 20 4e 4f 4e 49 4e 46 52 49 4e 47 45 4d 45 4e 54 NONINFRINGEMENT
0360: 2e 20 52 45 4d 45 4d 42 45 52 2c 20 54 48 45 52 . REMEMBER, THER
0370: 45 20 49 53 20 4e 4f 0a 3b 3b 20 53 43 48 45 4d E IS NO.;; SCHEM
0380: 45 20 55 4e 44 45 52 47 52 4f 55 4e 44 2e 20 49 E UNDERGROUND. I
0390: 4e 20 4e 4f 20 45 56 45 4e 54 20 53 48 41 4c 4c N NO EVENT SHALL
03a0: 20 54 48 45 20 41 55 54 48 4f 52 53 20 4f 52 20 THE AUTHORS OR
03b0: 43 4f 50 59 52 49 47 48 54 20 48 4f 4c 44 45 52 COPYRIGHT HOLDER
03c0: 53 20 42 45 0a 3b 3b 20 4c 49 41 42 4c 45 20 46 S BE.;; LIABLE F
03d0: 4f 52 20 41 4e 59 20 43 4c 41 49 4d 2c 20 44 41 OR ANY CLAIM, DA
03e0: 4d 41 47 45 53 20 4f 52 20 4f 54 48 45 52 20 4c MAGES OR OTHER L
03f0: 49 41 42 49 4c 49 54 59 2c 20 57 48 45 54 48 45 IABILITY, WHETHE
0400: 52 20 49 4e 20 41 4e 20 41 43 54 49 4f 4e 20 4f R IN AN ACTION O
0410: 46 0a 3b 3b 20 43 4f 4e 54 52 41 43 54 2c 20 54 F.;; CONTRACT, T
0420: 4f 52 54 20 4f 52 20 4f 54 48 45 52 57 49 53 45 ORT OR OTHERWISE
0430: 2c 20 41 52 49 53 49 4e 47 20 46 52 4f 4d 2c 20 , ARISING FROM,
0440: 4f 55 54 20 4f 46 20 4f 52 20 49 4e 20 43 4f 4e OUT OF OR IN CON
0450: 4e 45 43 54 49 4f 4e 20 57 49 54 48 20 54 48 45 NECTION WITH THE
0460: 0a 3b 3b 20 53 4f 46 54 57 41 52 45 20 4f 52 20 .;; SOFTWARE OR
0470: 54 48 45 20 55 53 45 20 4f 52 20 4f 54 48 45 52 THE USE OR OTHER
0480: 20 44 45 41 4c 49 4e 47 53 20 49 4e 20 54 48 45 DEALINGS IN THE
0490: 20 53 4f 46 54 57 41 52 45 2e 0a 0a 3b 20 54 68 SOFTWARE...; Th
04a0: 69 73 20 6c 69 62 72 61 72 79 20 62 72 65 61 6b is library break
04b0: 73 20 61 20 63 69 72 63 75 6c 61 72 20 69 6e 74 s a circular int
04c0: 65 72 64 65 70 65 6e 64 65 6e 63 65 20 62 65 74 erdependence bet
04d0: 77 65 65 6e 20 74 68 65 0a 3b 20 70 72 6f 63 65 ween the.; proce
04e0: 64 75 72 61 6c 20 61 6e 64 20 69 6e 73 70 65 63 dural and inspec
04f0: 74 69 6f 6e 20 6c 69 62 72 61 72 69 65 73 2e 0a tion libraries..
0500: 0a 23 21 72 36 72 73 0a 28 6c 69 62 72 61 72 79 .#!r6rs.(library
0510: 20 28 73 72 66 69 20 73 39 39 20 72 65 63 6f 72 (srfi s99 recor
0520: 64 73 20 68 65 6c 70 65 72 29 0a 20 20 28 65 78 ds helper). (ex
0530: 70 6f 72 74 0a 20 20 20 20 72 74 64 3f 29 0a 20 port. rtd?).
0540: 20 28 69 6d 70 6f 72 74 0a 20 20 20 20 28 72 6e (import. (rn
0550: 72 73 20 62 61 73 65 29 0a 20 20 20 20 28 72 6e rs base). (rn
0560: 72 73 20 72 65 63 6f 72 64 73 20 70 72 6f 63 65 rs records proce
0570: 64 75 72 61 6c 29 29 0a 0a 20 20 28 64 65 66 69 dural)).. (defi
0580: 6e 65 20 72 74 64 3f 20 72 65 63 6f 72 64 2d 74 ne rtd? record-t
0590: 79 70 65 2d 64 65 73 63 72 69 70 74 6f 72 3f 29 ype-descriptor?)
05a0: 0a 29 0a .).