
Documentation for a Collection of R7RS Libraries Peter Lane May 2017 Documentation for R7RS Libraries ii Contents 1 Introduction 1 1.1 Getting Started....................................................1 1.2 Documentation....................................................2 2 Abbrev: (import (robin abbrev)) 3 2.1 abbrev.........................................................3 3 Constants: (import (robin constants)) 4 4 CSV: (import (robin csv)) 5 4.1 make-csv-reader....................................................5 4.2 csv-read........................................................5 4.3 csv-read-all......................................................5 4.4 make-csv-writer....................................................6 4.5 csv-write.......................................................6 4.6 csv-write-all......................................................6 5 Directory: (import (robin directory)) 7 5.1 change-directory...................................................7 5.2 current-directory...................................................7 5.3 delete-directory....................................................7 5.4 list-directory......................................................7 5.5 list-directory-files...................................................8 5.6 list-glob........................................................8 5.7 make-directory....................................................8 5.8 Example: Count lines of Scheme code........................................9 6 Disjoint Set: (import (robin disjoint-set)) 10 6.1 make-disjoint-set................................................... 10 6.2 disjoint-set?...................................................... 10 6.3 disjoint-set:make................................................... 10 6.4 disjoint-set:find.................................................... 10 6.5 disjoint-set:union................................................... 10 6.6 disjoint-set:size.................................................... 10 6.7 Example: Kruskal’s Algorithm............................................ 11 Documentation for R7RS Libraries iii 7 Logger: (import (robin logger)) 12 7.1 new-logger...................................................... 12 7.2 logger?........................................................ 12 7.3 log-close........................................................ 12 7.4 log-add........................................................ 13 7.5 log-unknown log-fatal log-error log-warn log-info log-debug............................ 13 7.6 log-level........................................................ 13 7.7 log-unknown? log-fatal? log-error? log-warn? log-info? log-debug?........................ 13 7.8 Example........................................................ 13 8 Series: (import (robin series)) 15 8.1 Scanners........................................................ 15 8.1.1 series..................................................... 15 8.1.2 series?..................................................... 15 8.1.3 make-series.................................................. 15 8.1.4 scan...................................................... 15 8.1.5 scan-list.................................................... 15 8.1.6 scan-vector.................................................. 16 8.1.7 scan-string.................................................. 16 8.1.8 scan-range.................................................. 16 8.1.9 scan-sublists................................................. 16 8.1.10 scan-alist................................................... 16 8.1.11 scan-file.................................................... 16 8.1.12 scan-fn.................................................... 16 8.1.13 scan-fn-inclusive............................................... 16 8.2 Mapping........................................................ 16 8.2.1 map-fn.................................................... 16 8.3 Truncation....................................................... 16 8.3.1 until...................................................... 16 8.3.2 until-if.................................................... 16 8.4 Other On-Line Transducers.............................................. 17 8.4.1 previous.................................................... 17 8.5 Choosing and Expanding............................................... 17 8.5.1 choose.................................................... 17 8.5.2 choose-if................................................... 17 8.5.3 spread..................................................... 17 8.5.4 expand.................................................... 17 8.6 Other Off-Line Transducers.............................................. 17 8.6.1 catenate.................................................... 17 Documentation for R7RS Libraries iv 8.6.2 subseries................................................... 17 8.6.3 positions................................................... 17 8.6.4 mask..................................................... 17 8.6.5 mingle.................................................... 17 8.7 Collectors....................................................... 18 8.7.1 collect-last.................................................. 18 8.7.2 collect-first.................................................. 18 8.7.3 collect-nth.................................................. 18 8.7.4 collect..................................................... 18 8.7.5 collect-string................................................. 18 8.7.6 collect-append................................................ 18 8.7.7 collect-alist.................................................. 18 8.7.8 collect-file.................................................. 18 8.7.9 collect-length................................................. 18 8.7.10 collect-sum.................................................. 18 8.7.11 collect-max.................................................. 18 8.7.12 collect-min.................................................. 19 8.7.13 collect-and.................................................. 19 8.7.14 collect-or................................................... 19 8.7.15 collect-fn................................................... 19 9 SRFI 64 Utilities: (import (robin srfi64-utils)) 20 9.1 test-all-equal..................................................... 20 9.2 test-approx-same................................................... 20 9.3 test-compare...................................................... 20 9.4 test-no-error...................................................... 21 10 Statistics: (import (robin statistics)) 22 10.1 arithmetic-mean.................................................... 22 10.2 arithmetic-geometric-mean.............................................. 22 10.3 coefficient-of-variation................................................ 22 10.4 combinations..................................................... 22 10.5 geometric-mean.................................................... 23 10.6 harmonic-mean.................................................... 23 10.7 jaccard-distance.................................................... 23 10.8 jaccard-index..................................................... 23 10.9 mean.......................................................... 24 10.10median......................................................... 24 10.11mode......................................................... 24 Documentation for R7RS Libraries v 10.12percentile....................................................... 24 10.13perlin-noise...................................................... 24 10.14permutations..................................................... 25 10.15population-standard-deviation............................................ 25 10.16population-variance.................................................. 25 10.17random-normal.................................................... 25 10.18random-pick...................................................... 26 10.19random-sample.................................................... 26 10.20random-weighted-sample............................................... 26 10.21sign.......................................................... 26 10.22sorenson-dice-index.................................................. 27 10.23standard-deviation................................................... 27 10.24standard-error-of-the-mean.............................................. 27 10.25variance........................................................ 27 11 Text: (import (robin text)) 28 11.1 daitch-mokotoff-soundex............................................... 28 11.2 hamming-distance................................................... 28 11.3 levenshtein-distance.................................................. 29 11.4 metaphone....................................................... 29 11.5 optimal-string-alignment-distance.......................................... 29 11.6 porter-stem...................................................... 30 11.7 russell-soundex.................................................... 30 11.8 sorenson-dice-similarity............................................... 30 11.9 soundex........................................................ 30 11.10string!n-grams.................................................... 30 11.11words!with-commas................................................. 31 11.12word-wrap....................................................... 31 12 PS/Tk: Tk Graphical User Interface
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages141 Page
-
File Size-