r5rs.scm 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. ;;; R7RS (scheme r5rs)
  2. ;;; Copyright (C) 2024 Igalia, S.L.
  3. ;;;
  4. ;;; Licensed under the Apache License, Version 2.0 (the "License");
  5. ;;; you may not use this file except in compliance with the License.
  6. ;;; You may obtain a copy of the License at
  7. ;;;
  8. ;;; http://www.apache.org/licenses/LICENSE-2.0
  9. ;;;
  10. ;;; Unless required by applicable law or agreed to in writing, software
  11. ;;; distributed under the License is distributed on an "AS IS" BASIS,
  12. ;;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. ;;; See the License for the specific language governing permissions and
  14. ;;; limitations under the License.
  15. ;;; Commentary:
  16. ;;;
  17. ;;; A definition of R5RS (scheme r5rs).
  18. ;;;
  19. ;;; Code:
  20. (library (scheme r5rs)
  21. (export *
  22. +
  23. -
  24. /
  25. <
  26. <=
  27. =
  28. >
  29. >=
  30. abs
  31. acos
  32. and
  33. angle
  34. append
  35. apply
  36. asin
  37. assoc
  38. assq
  39. assv
  40. atan
  41. begin
  42. boolean?
  43. caaaar
  44. caaadr
  45. caaar
  46. caadar
  47. caaddr
  48. caadr
  49. caar
  50. cadaar
  51. cadadr
  52. cadar
  53. caddar
  54. cadddr
  55. caddr
  56. cadr
  57. call-with-current-continuation
  58. call-with-input-file
  59. call-with-output-file
  60. call-with-values
  61. car
  62. case
  63. cdaaar
  64. cdaadr
  65. cdaar
  66. cdadar
  67. cdaddr
  68. cdadr
  69. cdar
  70. cddaar
  71. cddadr
  72. cddar
  73. cdddar
  74. cddddr
  75. cdddr
  76. cddr
  77. cdr
  78. ceiling
  79. char->integer
  80. char-alphabetic?
  81. char-ci<=?
  82. char-ci<?
  83. char-ci=?
  84. char-ci>=?
  85. char-ci>?
  86. char-downcase
  87. char-lower-case?
  88. char-numeric?
  89. char-ready?
  90. char-upcase
  91. char-upper-case?
  92. char-whitespace?
  93. char<=?
  94. char<?
  95. char=?
  96. char>=?
  97. char>?
  98. char?
  99. close-input-port
  100. close-output-port
  101. complex?
  102. cond
  103. cons
  104. cos
  105. current-input-port
  106. current-output-port
  107. define
  108. define-syntax
  109. delay
  110. denominator
  111. display
  112. do
  113. dynamic-wind
  114. eof-object?
  115. eq?
  116. equal?
  117. eqv?
  118. eval
  119. even?
  120. exact->inexact
  121. exact?
  122. exp
  123. expt
  124. floor
  125. for-each
  126. force
  127. gcd
  128. if
  129. imag-part
  130. inexact->exact
  131. inexact?
  132. input-port?
  133. integer->char
  134. integer?
  135. interaction-environment
  136. lambda
  137. lcm
  138. length
  139. let
  140. let*
  141. let-syntax
  142. letrec
  143. letrec-syntax
  144. list
  145. list->string
  146. list->vector
  147. list-ref
  148. list-tail
  149. list?
  150. load
  151. log
  152. magnitude
  153. make-polar
  154. make-rectangular
  155. make-string
  156. make-vector
  157. map
  158. max
  159. member
  160. memq
  161. memv
  162. min
  163. modulo
  164. negative?
  165. newline
  166. not
  167. null-environment
  168. null?
  169. number->string
  170. number?
  171. numerator
  172. odd?
  173. open-input-file
  174. open-output-file
  175. or
  176. output-port?
  177. pair?
  178. peek-char
  179. positive?
  180. procedure?
  181. quasiquote
  182. quote
  183. quotient
  184. rational?
  185. rationalize
  186. read
  187. read-char
  188. real-part
  189. real?
  190. remainder
  191. reverse
  192. round
  193. scheme-report-environment
  194. set!
  195. set-car!
  196. set-cdr!
  197. sin
  198. sqrt
  199. string
  200. string->list
  201. string->number
  202. string->symbol
  203. string-append
  204. string-ci<=?
  205. string-ci<?
  206. string-ci=?
  207. string-ci>=?
  208. string-ci>?
  209. string-copy
  210. string-fill!
  211. string-length
  212. string-ref
  213. string-set!
  214. string<=?
  215. string<?
  216. string=?
  217. string>=?
  218. string>?
  219. string?
  220. substring
  221. symbol->string
  222. symbol?
  223. tan
  224. truncate
  225. values
  226. vector
  227. vector->list
  228. vector-fill!
  229. vector-length
  230. vector-ref
  231. vector-set!
  232. vector?
  233. with-input-from-file
  234. with-output-to-file
  235. write
  236. write-char
  237. zero?)
  238. (import (scheme base)
  239. (scheme char)
  240. (scheme complex)
  241. (scheme cxr)
  242. (scheme eval)
  243. (scheme file)
  244. (rename (scheme inexact)
  245. (inexact exact->inexact)
  246. (exact inexact->exact))
  247. (scheme lazy)
  248. (scheme load)
  249. (scheme process-context)
  250. (scheme read)
  251. (scheme repl)
  252. (scheme write)))