mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-19 05:39:17 +02:00
Improve MD formatting
This commit is contained in:
parent
c7c889d0b7
commit
cfefbbf90b
1 changed files with 305 additions and 74 deletions
|
@ -79,234 +79,465 @@ For more information see the [R<sup>7</sup>RS Scheme Specification](../r7rs.pdf)
|
||||||
- [`vector-set! `](#vector-set)
|
- [`vector-set! `](#vector-set)
|
||||||
- [`vector? `](#vector)
|
- [`vector? `](#vector)
|
||||||
|
|
||||||
#\*
|
# \*
|
||||||
|
|
||||||
(* z1 ...)
|
(* z1 ...)
|
||||||
|
|
||||||
Return the product of the arguments.
|
Return the product of the arguments.
|
||||||
#+
|
|
||||||
|
# +
|
||||||
|
|
||||||
(+ z1 ...)
|
(+ z1 ...)
|
||||||
|
|
||||||
Return the sum of the arguments.
|
Return the sum of the arguments.
|
||||||
#-
|
|
||||||
|
# -
|
||||||
|
|
||||||
(- z)
|
(- z)
|
||||||
|
|
||||||
(- z1 z2 ...)
|
(- z1 z2 ...)
|
||||||
|
|
||||||
With two or more arguments return their difference. With one argument return the additive inverse.
|
With two or more arguments return their difference. With one argument return the additive inverse.
|
||||||
#/
|
|
||||||
|
# /
|
||||||
|
|
||||||
(/ z)
|
(/ z)
|
||||||
|
|
||||||
(/ z1 z2 ...)
|
(/ z1 z2 ...)
|
||||||
|
|
||||||
With two or more arguments return the quotient of the arguments. With one argument return the multiplicative inverse.
|
With two or more arguments return the quotient of the arguments. With one argument return the multiplicative inverse.
|
||||||
#<
|
|
||||||
|
# <
|
||||||
|
|
||||||
(< x1 x2 ...)
|
(< x1 x2 ...)
|
||||||
|
|
||||||
Return `#t` if the arguments are monotonically increasing, or `#f` otherwise.
|
Return `#t` if the arguments are monotonically increasing, or `#f` otherwise.
|
||||||
#<=
|
|
||||||
|
# <=
|
||||||
|
|
||||||
(<= x1 x2 ...)
|
(<= x1 x2 ...)
|
||||||
|
|
||||||
Return `#t` if the arguments are monotonically non-decreasing, or `#f` otherwise.
|
Return `#t` if the arguments are monotonically non-decreasing, or `#f` otherwise.
|
||||||
#=
|
|
||||||
|
# =
|
||||||
|
|
||||||
(= x1 x2 ...)
|
(= x1 x2 ...)
|
||||||
|
|
||||||
Return `#t` if the arguments are equal, or `#f` otherwise.
|
Return `#t` if the arguments are equal, or `#f` otherwise.
|
||||||
#>
|
|
||||||
|
# >
|
||||||
|
|
||||||
(> x1 x2 ...)
|
(> x1 x2 ...)
|
||||||
|
|
||||||
Return `#t` if the arguments are monotonically decreasing, or `#f` otherwise.
|
Return `#t` if the arguments are monotonically decreasing, or `#f` otherwise.
|
||||||
#>=
|
|
||||||
|
# >=
|
||||||
|
|
||||||
(>= x1 x2 ...)
|
(>= x1 x2 ...)
|
||||||
|
|
||||||
Return `#t` if the arguments are monotonically non-increasing, or `#f` otherwise.
|
Return `#t` if the arguments are monotonically non-increasing, or `#f` otherwise.
|
||||||
#apply
|
|
||||||
|
# apply
|
||||||
|
|
||||||
(apply proc arg1 ... args)
|
(apply proc arg1 ... args)
|
||||||
|
|
||||||
The `apply` procedure calls `proc` with the elements of the list `(append (list arg1 ...) args)` as the actual arguments.
|
The `apply` procedure calls `proc` with the elements of the list `(append (list arg1 ...) args)` as the actual arguments.
|
||||||
#boolean?
|
|
||||||
|
# boolean?
|
||||||
|
|
||||||
(boolean? obj)
|
(boolean? obj)
|
||||||
|
|
||||||
Determine if `obj` is a boolean.
|
Determine if `obj` is a boolean.
|
||||||
#bytevector
|
|
||||||
|
# bytevector
|
||||||
|
|
||||||
(bytevector byte ...)
|
(bytevector byte ...)
|
||||||
|
|
||||||
Create a new bytevector consisting of the given bytes.
|
Create a new bytevector consisting of the given bytes.
|
||||||
#bytevector-append
|
|
||||||
|
# bytevector-append
|
||||||
|
|
||||||
(bytevector-append bytevector ...)
|
(bytevector-append bytevector ...)
|
||||||
|
|
||||||
Append give bytevectors to create a new bytevector.
|
Append give bytevectors to create a new bytevector.
|
||||||
#bytevector-length
|
|
||||||
|
# bytevector-length
|
||||||
|
|
||||||
(bytevector-length bytevector)
|
(bytevector-length bytevector)
|
||||||
|
|
||||||
Return the length of the given bytevector.
|
Return the length of the given bytevector.
|
||||||
#bytevector-u8-ref
|
|
||||||
|
# bytevector-u8-ref
|
||||||
|
|
||||||
(bytevector-u8-ref bytevector k)
|
(bytevector-u8-ref bytevector k)
|
||||||
|
|
||||||
Return the bytevector element at index `k`.
|
Return the bytevector element at index `k`.
|
||||||
#bytevector-u8-set!
|
|
||||||
|
# bytevector-u8-set!
|
||||||
|
|
||||||
(bytevector-u8-set! bytevector k byte)
|
(bytevector-u8-set! bytevector k byte)
|
||||||
|
|
||||||
Change the value at index `k` of the bytevector to `byte`.
|
Change the value at index `k` of the bytevector to `byte`.
|
||||||
#bytevector?
|
|
||||||
|
# bytevector?
|
||||||
|
|
||||||
(bytevector? obj)
|
(bytevector? obj)
|
||||||
|
|
||||||
Determine if `obj` is a bytevector.
|
Determine if `obj` is a bytevector.
|
||||||
#caar
|
|
||||||
|
# caar
|
||||||
|
|
||||||
(caar pair)
|
(caar pair)
|
||||||
|
|
||||||
Return `(car (car pair))`
|
Return `(car (car pair))`
|
||||||
#cadr
|
|
||||||
|
# cadr
|
||||||
|
|
||||||
(cadr pair)
|
(cadr pair)
|
||||||
|
|
||||||
Return `(car (cdr pair))`
|
Return `(car (cdr pair))`
|
||||||
#car
|
|
||||||
|
# car
|
||||||
|
|
||||||
(car pair)
|
(car pair)
|
||||||
|
|
||||||
Return the contents of the car field of `pair`.
|
Return the contents of the car field of `pair`.
|
||||||
#cdar
|
|
||||||
|
# cdar
|
||||||
|
|
||||||
(cdar pair)
|
(cdar pair)
|
||||||
|
|
||||||
Return `(cdr (car pair))`
|
Return `(cdr (car pair))`
|
||||||
#cddr
|
|
||||||
|
# cddr
|
||||||
|
|
||||||
(cddr pair)
|
(cddr pair)
|
||||||
|
|
||||||
Return `(cdr (cdr pair))`
|
Return `(cdr (cdr pair))`
|
||||||
#cdr
|
|
||||||
|
# cdr
|
||||||
|
|
||||||
(cdr pair)
|
(cdr pair)
|
||||||
|
|
||||||
Return the contents of the cdr field of `pair`.
|
Return the contents of the cdr field of `pair`.
|
||||||
#char->integer
|
|
||||||
|
# char->integer
|
||||||
|
|
||||||
(char->integer char)
|
(char->integer char)
|
||||||
|
|
||||||
Return the `char` as an integer value.
|
Return the `char` as an integer value.
|
||||||
#char?
|
|
||||||
|
# char?
|
||||||
|
|
||||||
(char? obj)
|
(char? obj)
|
||||||
|
|
||||||
Determine if `obj` is a character.
|
Determine if `obj` is a character.
|
||||||
#close-input-port
|
|
||||||
|
# close-input-port
|
||||||
|
|
||||||
(close-input-port port)
|
(close-input-port port)
|
||||||
|
|
||||||
Close the given input port.
|
Close the given input port.
|
||||||
#close-output-port
|
|
||||||
|
# close-output-port
|
||||||
|
|
||||||
(close-output-port port)
|
(close-output-port port)
|
||||||
|
|
||||||
Close the given output port.
|
Close the given output port.
|
||||||
#close-port
|
|
||||||
|
# close-port
|
||||||
|
|
||||||
(close-port port)
|
(close-port port)
|
||||||
|
|
||||||
Close the given port.
|
Close the given port.
|
||||||
#command-line-arguments
|
|
||||||
|
# command-line-arguments
|
||||||
|
|
||||||
(command-line-arguments)
|
(command-line-arguments)
|
||||||
|
|
||||||
Return the command line arguments to the program as a list of strings.
|
Return the command line arguments to the program as a list of strings.
|
||||||
#cons
|
|
||||||
|
# cons
|
||||||
|
|
||||||
(cons a b)
|
(cons a b)
|
||||||
|
|
||||||
Create a new pair with its car field set to `a` and its cdr field set to `b`.
|
Create a new pair with its car field set to `a` and its cdr field set to `b`.
|
||||||
#delete-file
|
|
||||||
|
# delete-file
|
||||||
|
|
||||||
(delete-file string)
|
(delete-file string)
|
||||||
|
|
||||||
Delete a file with the given filename.
|
Delete a file with the given filename.
|
||||||
#eof-object?
|
|
||||||
|
# eof-object?
|
||||||
|
|
||||||
(eof-object? obj)
|
(eof-object? obj)
|
||||||
|
|
||||||
Determine if the given object is an EOF object.
|
Determine if the given object is an EOF object.
|
||||||
#eq?
|
|
||||||
|
# eq?
|
||||||
|
|
||||||
(eq? a b)
|
(eq? a b)
|
||||||
|
|
||||||
Determine if `a` and `b` are equal by comparing their pointer values. This operation is guaranteed to be a single comparison no matter the type of each object passed to the function.
|
Determine if `a` and `b` are equal by comparing their pointer values. This operation is guaranteed to be a single comparison no matter the type of each object passed to the function.
|
||||||
#equal?
|
|
||||||
|
# equal?
|
||||||
|
|
||||||
(equal? a b)
|
(equal? a b)
|
||||||
|
|
||||||
Determine if `a` and `b` are equal by doing a "deep" comparison. For lists and vectors this means each element in the data structures will be compared until either the end of the structure is reached or an inequality is found. `equal?` is guaranteed to work for circular lists.
|
Determine if `a` and `b` are equal by doing a "deep" comparison. For lists and vectors this means each element in the data structures will be compared until either the end of the structure is reached or an inequality is found. `equal?` is guaranteed to work for circular lists.
|
||||||
#eqv?
|
|
||||||
|
# eqv?
|
||||||
|
|
||||||
(eqv? a b)
|
(eqv? a b)
|
||||||
|
|
||||||
An alias of `eq?`.
|
An alias of `eq?`.
|
||||||
#error
|
|
||||||
|
# error
|
||||||
|
|
||||||
(error message obj ...)
|
(error message obj ...)
|
||||||
|
|
||||||
Raises an exception by calling `raise` with the given message and objects.
|
Raises an exception by calling `raise` with the given message and objects.
|
||||||
#exit
|
|
||||||
|
# exit
|
||||||
|
|
||||||
(exit)
|
(exit)
|
||||||
|
|
||||||
(exit obj)
|
(exit obj)
|
||||||
|
|
||||||
Exit the program.
|
Exit the program.
|
||||||
#file-exists?
|
|
||||||
|
# file-exists?
|
||||||
|
|
||||||
(file-exists? string)
|
(file-exists? string)
|
||||||
|
|
||||||
Determine if the file with filename `string` exists.
|
Determine if the file with filename `string` exists.
|
||||||
#integer->char
|
|
||||||
|
# integer->char
|
||||||
|
|
||||||
(integer->char x)
|
(integer->char x)
|
||||||
|
|
||||||
Return a character with the same value as the given integer.
|
Return a character with the same value as the given integer.
|
||||||
#integer?
|
|
||||||
|
# integer?
|
||||||
|
|
||||||
(integer? obj)
|
(integer? obj)
|
||||||
|
|
||||||
Determine if the given object is an integer.
|
Determine if the given object is an integer.
|
||||||
#length
|
|
||||||
|
# length
|
||||||
|
|
||||||
(length list)
|
(length list)
|
||||||
|
|
||||||
Returns the length of `list`.
|
Returns the length of `list`.
|
||||||
#list->string
|
|
||||||
|
# list->string
|
||||||
|
|
||||||
(list->string list)
|
(list->string list)
|
||||||
|
|
||||||
Convert the given list of characters to a string.
|
Convert the given list of characters to a string.
|
||||||
#list->vector
|
|
||||||
|
# list->vector
|
||||||
|
|
||||||
(list->vector list)
|
(list->vector list)
|
||||||
|
|
||||||
Convert the given list to a vector.
|
Convert the given list to a vector.
|
||||||
#make-bytevector
|
|
||||||
|
# make-bytevector
|
||||||
|
|
||||||
(make-bytevector k)
|
(make-bytevector k)
|
||||||
|
|
||||||
(make-bytevector k byte)
|
(make-bytevector k byte)
|
||||||
|
|
||||||
Create a new bytevector of length `k`. If `byte` is provided, each element of the bytevector will be assigned this value.
|
Create a new bytevector of length `k`. If `byte` is provided, each element of the bytevector will be assigned this value.
|
||||||
#make-vector
|
|
||||||
|
# make-vector
|
||||||
|
|
||||||
(make-vector k)
|
(make-vector k)
|
||||||
|
|
||||||
(make-vector k obj)
|
(make-vector k obj)
|
||||||
|
|
||||||
Create a new vector of length `k`. If `obj` is provided, each element of the vector will be assigned this value.
|
Create a new vector of length `k`. If `obj` is provided, each element of the vector will be assigned this value.
|
||||||
#null?
|
|
||||||
|
# null?
|
||||||
|
|
||||||
(null? obj)
|
(null? obj)
|
||||||
|
|
||||||
Determine if the given object is the empty list.
|
Determine if the given object is the empty list.
|
||||||
#number->string
|
|
||||||
|
# number->string
|
||||||
|
|
||||||
(number->string z)
|
(number->string z)
|
||||||
|
|
||||||
(number->string z radix)
|
(number->string z radix)
|
||||||
|
|
||||||
Return a string representation of the given number.
|
Return a string representation of the given number.
|
||||||
#number?
|
|
||||||
|
# number?
|
||||||
|
|
||||||
(number? obj)
|
(number? obj)
|
||||||
|
|
||||||
Determine if the given object is a number.
|
Determine if the given object is a number.
|
||||||
#open-input-file
|
|
||||||
|
# open-input-file
|
||||||
|
|
||||||
(open-input-file string)
|
(open-input-file string)
|
||||||
|
|
||||||
Return an input port that can deliver data from the file `string`.
|
Return an input port that can deliver data from the file `string`.
|
||||||
#open-output-file
|
|
||||||
|
# open-output-file
|
||||||
|
|
||||||
(open-output-file string)
|
(open-output-file string)
|
||||||
|
|
||||||
Return an output port that can deliver data from the file `string`.
|
Return an output port that can deliver data from the file `string`.
|
||||||
#pair?
|
|
||||||
|
# pair?
|
||||||
|
|
||||||
(pair? obj)
|
(pair? obj)
|
||||||
|
|
||||||
Determine if `obj` is a pair.
|
Determine if `obj` is a pair.
|
||||||
#peek-char
|
|
||||||
|
# peek-char
|
||||||
|
|
||||||
(peek-char)
|
(peek-char)
|
||||||
|
|
||||||
(peek-char port)
|
(peek-char port)
|
||||||
|
|
||||||
Returns the next character available from the input port. If no characters are available and end-of-file object is returned.
|
Returns the next character available from the input port. If no characters are available and end-of-file object is returned.
|
||||||
#port?
|
|
||||||
|
# port?
|
||||||
|
|
||||||
(port? obj)
|
(port? obj)
|
||||||
|
|
||||||
Determine if `obj` is a port.
|
Determine if `obj` is a port.
|
||||||
#procedure?
|
|
||||||
|
# procedure?
|
||||||
|
|
||||||
(procedure? obj)
|
(procedure? obj)
|
||||||
|
|
||||||
Determine if `obj` is a function.
|
Determine if `obj` is a function.
|
||||||
#read-char
|
|
||||||
|
# read-char
|
||||||
|
|
||||||
(read-char)
|
(read-char)
|
||||||
|
|
||||||
(read-char port)
|
(read-char port)
|
||||||
|
|
||||||
Read a character from the input port.
|
Read a character from the input port.
|
||||||
#real?
|
|
||||||
|
# real?
|
||||||
|
|
||||||
(real? obj)
|
(real? obj)
|
||||||
|
|
||||||
Determine if `obj` is a real number.
|
Determine if `obj` is a real number.
|
||||||
#set-car!
|
|
||||||
|
# set-car!
|
||||||
|
|
||||||
(set-car! pair obj)
|
(set-car! pair obj)
|
||||||
|
|
||||||
Set the car field of `pair` to `obj`.
|
Set the car field of `pair` to `obj`.
|
||||||
#set-cdr!
|
|
||||||
|
# set-cdr!
|
||||||
|
|
||||||
(set-cdr! pair obj)
|
(set-cdr! pair obj)
|
||||||
|
|
||||||
Set the car field of `pair` to `obj`.
|
Set the car field of `pair` to `obj`.
|
||||||
#string->number
|
|
||||||
|
# string->number
|
||||||
|
|
||||||
(string->number string)
|
(string->number string)
|
||||||
|
|
||||||
(string->number string radix)
|
(string->number string radix)
|
||||||
|
|
||||||
Return the number represented by the given string.
|
Return the number represented by the given string.
|
||||||
#string->symbol
|
|
||||||
|
# string->symbol
|
||||||
|
|
||||||
(string->symbol string)
|
(string->symbol string)
|
||||||
|
|
||||||
Convert given string to a symbol.
|
Convert given string to a symbol.
|
||||||
#string-append
|
|
||||||
|
# string-append
|
||||||
|
|
||||||
(string-append string ...)
|
(string-append string ...)
|
||||||
|
|
||||||
Returns a new string whose characters are the concatenation of the given strings.
|
Returns a new string whose characters are the concatenation of the given strings.
|
||||||
#string-cmp
|
|
||||||
|
# string-cmp
|
||||||
|
|
||||||
(string-cmp string1 string2)
|
(string-cmp string1 string2)
|
||||||
|
|
||||||
Compare both strings and return 0 if the strings are equal, a positive number if `string1` is "greater than" `string2`, and a negative number otherwise.
|
Compare both strings and return 0 if the strings are equal, a positive number if `string1` is "greater than" `string2`, and a negative number otherwise.
|
||||||
#string-length
|
|
||||||
|
# string-length
|
||||||
|
|
||||||
(string-length string)
|
(string-length string)
|
||||||
|
|
||||||
Return the length of `string`.
|
Return the length of `string`.
|
||||||
#string-ref
|
|
||||||
|
# string-ref
|
||||||
|
|
||||||
(string-ref string k)
|
(string-ref string k)
|
||||||
|
|
||||||
Return the character at position `k` of `string`.
|
Return the character at position `k` of `string`.
|
||||||
#string-set!
|
|
||||||
|
# string-set!
|
||||||
|
|
||||||
(string-set! string k char)
|
(string-set! string k char)
|
||||||
|
|
||||||
Set the character of `string` at position `k` to `char`.
|
Set the character of `string` at position `k` to `char`.
|
||||||
#string?
|
|
||||||
|
# string?
|
||||||
|
|
||||||
(string? obj)
|
(string? obj)
|
||||||
|
|
||||||
Determine if `obj` is a string.
|
Determine if `obj` is a string.
|
||||||
#substring
|
|
||||||
|
# substring
|
||||||
|
|
||||||
(substring string start end)
|
(substring string start end)
|
||||||
|
|
||||||
Return a newly-allocatd string consisting of the characters of `string` starting from position `start` and ending at `end`.
|
Return a newly-allocatd string consisting of the characters of `string` starting from position `start` and ending at `end`.
|
||||||
#symbol->string
|
|
||||||
|
# symbol->string
|
||||||
|
|
||||||
(symbol->string symbol)
|
(symbol->string symbol)
|
||||||
|
|
||||||
Return a string based on the given symbol.
|
Return a string based on the given symbol.
|
||||||
#symbol?
|
|
||||||
|
# symbol?
|
||||||
|
|
||||||
(symbol? obj)
|
(symbol? obj)
|
||||||
|
|
||||||
Determine if `obj` is a symbol.
|
Determine if `obj` is a symbol.
|
||||||
#system
|
|
||||||
|
# system
|
||||||
|
|
||||||
(system string)
|
(system string)
|
||||||
|
|
||||||
Execute an OS command `string` and return the resulting status as a number.
|
Execute an OS command `string` and return the resulting status as a number.
|
||||||
#vector-length
|
|
||||||
|
# vector-length
|
||||||
|
|
||||||
(vector-length vector)
|
(vector-length vector)
|
||||||
|
|
||||||
Return the length of `vector`.
|
Return the length of `vector`.
|
||||||
#vector-ref
|
|
||||||
|
# vector-ref
|
||||||
|
|
||||||
(vector-ref vector k)
|
(vector-ref vector k)
|
||||||
|
|
||||||
Return the element at position `k` of `vector`.
|
Return the element at position `k` of `vector`.
|
||||||
#vector-set!
|
|
||||||
|
# vector-set!
|
||||||
|
|
||||||
(vector-set! vector k obj)
|
(vector-set! vector k obj)
|
||||||
|
|
||||||
Set the element of `vector` at position `k` to `obj`.
|
Set the element of `vector` at position `k` to `obj`.
|
||||||
#vector?
|
|
||||||
|
# vector?
|
||||||
|
|
||||||
(vector? obj)
|
(vector? obj)
|
||||||
|
|
||||||
Determine if `obj` is a vector.
|
Determine if `obj` is a vector.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue