r5rs.scm 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. ;;; R7RS compatibility libraries
  2. ;;; Copyright (C) 2019 Free Software Foundation, Inc.
  3. ;;;
  4. ;;; This library is free software: you can redistribute it and/or modify
  5. ;;; it under the terms of the GNU Lesser General Public License as
  6. ;;; published by the Free Software Foundation, either version 3 of the
  7. ;;; License, or (at your option) any later version.
  8. ;;;
  9. ;;; This library is distributed in the hope that it will be useful, but
  10. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. ;;; Lesser General Public License for more details.
  13. ;;;
  14. ;;; You should have received a copy of the GNU Lesser General Public
  15. ;;; License along with this program. If not, see
  16. ;;; <http://www.gnu.org/licenses/>.
  17. (define-module (scheme r5rs)
  18. #:use-module ((scheme base) #:select ((expt . r7:expt)))
  19. #:use-module ((ice-9 safe-r5rs) #:select (null-environment))
  20. #:use-module ((ice-9 r5rs) #:select (scheme-report-environment
  21. interaction-environment))
  22. #:re-export (quote
  23. quasiquote
  24. unquote unquote-splicing
  25. define-syntax let-syntax letrec-syntax
  26. define lambda let let* letrec begin do
  27. if set! delay and or
  28. syntax-rules _ ... else =>
  29. eqv? eq? equal?
  30. number? complex? real? rational? integer?
  31. exact? inexact?
  32. = < > <= >=
  33. zero? positive? negative? odd? even?
  34. max min
  35. + * - /
  36. abs
  37. quotient remainder modulo
  38. gcd lcm
  39. numerator denominator
  40. rationalize
  41. floor ceiling truncate round
  42. exp log sin cos tan asin acos atan
  43. sqrt
  44. (r7:expt . expt)
  45. make-rectangular make-polar real-part imag-part magnitude angle
  46. exact->inexact inexact->exact
  47. number->string string->number
  48. boolean?
  49. not
  50. pair?
  51. cons car cdr
  52. set-car! set-cdr!
  53. caar cadr cdar cddr
  54. caaar caadr cadar caddr cdaar cdadr cddar cdddr
  55. caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr
  56. cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr
  57. null?
  58. list?
  59. list
  60. length
  61. append
  62. reverse
  63. list-tail list-ref
  64. memq memv member
  65. assq assv assoc
  66. symbol?
  67. symbol->string string->symbol
  68. char?
  69. char=? char<? char>? char<=? char>=?
  70. char-ci=? char-ci<? char-ci>? char-ci<=? char-ci>=?
  71. char-alphabetic? char-numeric? char-whitespace?
  72. char-upper-case? char-lower-case?
  73. char->integer integer->char
  74. char-upcase
  75. char-downcase
  76. string?
  77. make-string
  78. string
  79. string-length
  80. string-ref string-set!
  81. string=? string-ci=?
  82. string<? string>? string<=? string>=?
  83. string-ci<? string-ci>? string-ci<=? string-ci>=?
  84. substring
  85. string-length
  86. string-append
  87. string->list list->string
  88. string-copy string-fill!
  89. vector?
  90. make-vector
  91. vector
  92. vector-length
  93. vector-ref vector-set!
  94. vector->list list->vector
  95. vector-fill!
  96. procedure?
  97. apply
  98. map
  99. for-each
  100. force
  101. call-with-current-continuation
  102. values
  103. call-with-values
  104. dynamic-wind
  105. eval
  106. input-port? output-port?
  107. current-input-port current-output-port
  108. read
  109. read-char
  110. peek-char
  111. eof-object?
  112. char-ready?
  113. write
  114. display
  115. newline
  116. write-char
  117. null-environment
  118. scheme-report-environment interaction-environment))