;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:40 2023


;; Source file "base64.c"

(base64-encode :type extended :synopsis "(base64-encode in)\n(base64-encode in out)" :description "Encode in Base64 the characters from input port |in| to the output port\n|out|. If |out| is not specified, it defaults to the current output port." :similar ())

(base64-decode :type extended :synopsis "(base64-decode in)\n(base64-decode in out)" :description "Decode the Base64 characters from input port |in| to the output port\n|out|. If |out| is not specified, it defaults to the current output port." :similar ())


;; Source file "boolean.c"

(not :type procedure :synopsis "(not obj)" :description "Not returns |#t| if |obj| is false, and returns |#f| otherwise.\n\n@lisp\n  (not #t)         =>  #f\n  (not 3)          =>  #f\n  (not (list 3))   =>  #f\n  (not #f)         =>  #t\n  (not '())        =>  #f\n  (not (list))     =>  #f\n  (not 'nil)       =>  #f\n@end lisp" :similar ())

(boolean? :type procedure :synopsis "(boolean? obj)" :description "|Boolean?| returns |#t| if |obj| is either |#t| or |#f| and returns\n|#f| otherwise.\n@lisp\n  (boolean? #f)         =>  #t\n  (boolean? 0)          =>  #f\n  (boolean? '())        =>  #f\n@end lisp" :similar ())

(eqv? :type procedure :synopsis "(eqv? obj1 obj2)" :description "The |eqv?| procedure defines a useful equivalence relation on objects.\nBriefly, it returns |#t| if |obj1| and |obj2| should normally be regarded\nas the same object. This relation is left slightly open to interpretation,\nbut the following partial specification of |eqv?| holds for all\nimplementations of Scheme.\n\nThe |eqv?| procedure returns |#t| if:\n,(itemize\n(item [\n|obj1| and |obj2| are both |#t| or both |#f|.\n])\n\n(item [\n|obj1| and |obj2| are both symbols and\n@lisp\n(string=? (symbol->string obj1)\n          (symbol->string obj2))\n                     =>  #t\n@end lisp\n\n,(bold \"Note:\") This assumes that neither |obj1| nor |obj2| is an\n\"uninterned symbol\".\n])\n\n(item [\n|obj1| and |obj2| are both keywords and\n@lisp\n(string=? (keyword->string obj1)\n          (keyword->string obj2))\n                     =>  #t\n@end lisp\n])\n\n(item [\n|obj1| and |obj2| are both numbers, are numerically equal\n(see ,(ref :mark \"=\")), and are either both exact or both inexact.\n])\n\n(item [\n|obj1| and |obj2| are both characters and are the same character\naccording to the |char=?| procedure (see ,(ref :mark \"char=?\")).\n])\n\n(item [\nboth |obj1| and |obj2| are the empty list.\n])\n\n(item [\n|obj1| and |obj2| are pairs, vectors, or strings that denote\nthe same locations in the store.\n])\n\n(item [\n|obj1| and |obj2| are procedures whose location tags are equal.\n])\n)\n\n,(bold \"Note:\") STklos extends R5RS |eqv?| to take into account\nthe keyword type.\n,(linebreak)\nHere are some examples:\n@lisp\n(eqv? 'a 'a)                     =>  #t\n(eqv? 'a 'b)                     =>  #f\n(eqv? 2 2)                       =>  #t\n(eqv? :foo :foo)                 =>  #t\n(eqv? :foo :bar)                 =>  #f\n(eqv? '() '())                   =>  #t\n(eqv? 100000000 100000000)       =>  #t\n(eqv? (cons 1 2) (cons 1 2))     =>  #f\n(eqv? (lambda () 1)\n      (lambda () 2))             =>  #f\n(eqv? #f 'nil)                   =>  #f\n(let ((p (lambda (x) x)))\n  (eqv? p p))                    =>  #t\n@end lisp\n\nThe following examples illustrate cases in which the above rules do\nnot fully specify the behavior of |eqv?|. All that can be said about\nsuch cases is that the value returned by eqv? must be a boolean.\n@lisp\n(eqv? \"\" \"\")             =>  unspecified\n(eqv? '#() '#())         =>  unspecified\n(eqv? (lambda (x) x)\n      (lambda (x) x))    =>  unspecified\n(eqv? (lambda (x) x)\n      (lambda (y) y))    =>  unspecified\n@end lisp\n\n,(bold \"Note:\") In fact, the value returned by STklos depends of\nthe way code is entered and can yield |#t| in some cases and |#f|\nin others.\n,(linebreak)\nSee R5RS for more details on |eqv?|." :similar ())

(eq? :type procedure :synopsis "(eq? obj1 obj2)" :description "|Eq?| is similar to |eqv?| except that in some cases it is capable of\ndiscerning distinctions finer than those detectable by |eqv?|.\n,(linebreak)\n|Eq?| and |eqv?| are guaranteed to have the same behavior on symbols,\nkeywords, booleans, the empty list, pairs, procedures, and non-empty strings\nand vectors. |Eq?|'s behavior on numbers and characters is\nimplementation-dependent, but it will always return either true or false,\nand will return true only when |eqv?| would also return true.\n|Eq?| may also behave differently from |eqv?| on empty vectors\nand empty strings.\n,(linebreak)\n,(bold \"Note:\") STklos extends R5RS |eq?| to take into account\nthe keyword type.\n,(linebreak)\n,(bold \"Note:\") In STklos, comparison of character returns |#t| for identical\ncharacters and |#f| otherwise.\n\n@lisp\n(eq? 'a 'a)                     =>  #t\n(eq? '(a) '(a))                 =>  unspecified\n(eq? (list 'a) (list 'a))       =>  #f\n(eq? \"a\" \"a\")                   =>  unspecified\n(eq? \"\" \"\")                     =>  unspecified\n(eq? :foo :foo)                 =>  #t\n(eq? :foo :bar)                 =>  #f\n(eq? '() '())                   =>  #t\n(eq? 2 2)                       =>  unspecified\n(eq? #\\\\A #\\\\A)                   =>  #t (unspecified in R5RS)\n(eq? car car)                   =>  #t\n(let ((n (+ 2 3)))\n  (eq? n n))                    =>  #t (unspecified in R5RS)\n(let ((x '(a)))\n  (eq? x x))                    =>  #t\n(let ((x '#()))\n  (eq? x x))                    =>  #t\n(let ((p (lambda (x) x)))\n  (eq? p p))                    =>  #t\n(eq? :foo :foo)                 =>  #t\n(eq? :bar bar:)                 =>  #t\n(eq? :bar :foo)                 =>  #f\n@end lisp\n" :similar ())

(equal? :type procedure :synopsis "(equal? obj1 obj2)" :description "|Equal?| recursively compares the contents of pairs, vectors, and\nstrings, applying |eqv?| on other objects such as numbers and symbols.\nA rule of thumb is that objects are generally |equal?| if they print the\nsame. |Equal?| always terminates even if its arguments are circular\ndata structures.\n@lisp\n(equal? 'a 'a)                  =>  #t\n(equal? '(a) '(a))              =>  #t\n(equal? '(a (b) c)\n        '(a (b) c))             =>  #t\n(equal? \"abc\" \"abc\")            =>  #t\n(equal? 2 2)                    =>  #t\n(equal? (make-vector 5 'a)\n        (make-vector 5 'a))     =>  #t\n(equal? '\\#1=(a b . \\#1\\#)\n        '\\#2=(a b a b . \\#2\\#)) =>  #t\n@end lisp\n\n,(bold \"Note:\") A rule of thumb is that objects are generally\n|equal?| if they print the same." :similar ())


;; Source file "boot.c"


;; Source file "box.c"

(box :type extended :synopsis "(box value ...)\n(make-box value ...)" :description "Returns a new box that contains all the given |value|s.\nThe box is mutable.\n@lisp\n(let ((x (box 10)))\n  (list 10 x))        => (10 #&10)\n@end lisp\n\nThe name |make-box| is now obsolete and kept only for compatibility." :similar (make-box))

(make-box :see box)
(constant-box :type extended :synopsis "(constant-box value ...)\n(make-constant-box value ...)" :description "Returns a new box that contains all the given |value|s. The box is immutable.\n\nThe name |make-constant-box| is now obsolete and kept only for compatibility." :similar (make-constant-box))

(make-constant-box :see constant-box)
(box? :type extended :synopsis "(box? obj)" :description "Returns |#t| if |obj|is box, |#f| otherwise." :similar ())

(box-mutable? :type extended :synopsis "(box-mutable? obj)" :description "Returns |#t| if |obj|is mutable box, |#f| otherwise." :similar ())

(unbox :type extended :synopsis "(unbox box)" :description "Returns the values currently in |box|." :similar ())

(set-box! :type extended :synopsis "(set-box! box value ...)\n(box-set! box value ...)" :description "Changes |box| to hold |value|s. It is an error if |set-box!| is called\nwith a number of values that differs from the number of values in the box\nbeing set. (In other words, |set-box!| does not allocate memory.)\n\nThe name |box-set!| is now obsolete and kept only for compatibility." :similar (box-set!))

(box-set! :see set-box!)
(box-arity :type extended :synopsis "(box-arity box)" :description "Returns the number of values in |box|." :similar ())

(unbox-value :type extended :synopsis "(unbox-value box i)" :description "Returns the |i|th value of |box|. It is an error if |i| is not an exact integer\nbetween 0 and |n|-1, when |n| is the number of values in |box|." :similar ())

(set-box-value! :type extended :synopsis "(set-box-value! box i obj)" :description "Changes the |i|th value of |box| to |obj|. It is an error if |i| is not an\nexact integer between 0 and |n|-1, when |n| is the number of values in |box|." :similar ())


;; Source file "char.c"

(char? :type procedure :synopsis "(char? obj)" :description "Returns |#t| if |obj| is a character, otherwise returns |#f|." :similar ())

(char>=? :type procedure :synopsis "(char=? char1 char2 ...)\n(char<? char1 char2 ...)\n(char>? char1 char2 ...)\n(char<=? char1 char2 ...)\n(char>=? char1 char2 ...)" :description "These procedures impose a total ordering on the set of characters.\nIt is guaranteed that under this ordering:\n,(itemize\n(item [The upper case characters are in order.])\n(item [The lower case characters are in order.])\n(item [The digits are in order.])\n(item [Either all the digits precede all the upper case letters, or vice versa.])\n(item [Either all the digits precede all the lower case letters, or vice versa.])\n)" :similar (char<=? char>? char<? char=?))

(char<=? :see char>=?)
(char>? :see char>=?)
(char<? :see char>=?)
(char=? :see char>=?)
(char-ci>=? :type procedure :synopsis "(char-ci=? char1 char2 ...)\n(char-ci<? char1 char2 ...)\n(char-ci>? char1 char2 ...)\n(char-ci<=? char1 char2 ...)\n(char-ci>=? char1 char2 ...)" :description "These procedures are similar to |char=?| et cetera, but they treat\nupper case and lower case letters as the same. For example,\n|(char-ci=? #\\A #\\a)| returns |#t|." :similar (char-ci<=? char-ci>? char-ci<? char-ci=?))

(char-ci<=? :see char-ci>=?)
(char-ci>? :see char-ci>=?)
(char-ci<? :see char-ci>=?)
(char-ci=? :see char-ci>=?)
(char-lower-case? :type procedure :synopsis "(char-alphabetic? char)\n(char-numeric? char)\n(char-whitespace? char)\n(char-upper-case? letter)\n(char-lower-case? letter)" :description "These procedures return |#t| if their arguments are alphabetic, numeric,\nwhitespace, upper case, or lower case characters, respectively, otherwise they\nreturn |#f|. The following remarks, which are specific to the ASCII character\nset, are intended only as a guide: The alphabetic characters are the 52\nupper and lower case letters. The numeric characters are the ten decimal\ndigits. The whitespace characters are space, tab, line feed, form feed,\nand carriage return." :similar (char-upper-case? char-whitespace? char-numeric? char-alphabetic?))

(char-upper-case? :see char-lower-case?)
(char-whitespace? :see char-lower-case?)
(char-numeric? :see char-lower-case?)
(char-alphabetic? :see char-lower-case?)
(digit-value :type r7rs-procedure :synopsis "(digit-value char)" :description "This procedure returns the numeric value (0 to 9) of its\nargument if it is a numeric digit (that is, if char-numeric?\nreturns #t), or #f on any other character.\n@lisp\n(digit-value\n(digit-value #\\3)        => 3\n(digit-value #\\x0664)    => 4\n(digit-value #\\x0AE6)    => 0\n(digit-value #\\x0EA6)    #f\n@end lisp" :similar ())

(integer->char :type procedure :synopsis "(char->integer char)\n(integer->char n)" :description "Given a character, |char->integer| returns an exact integer\nrepresentation of the character. Given an exact integer that is the\nimage of a character under |char->integer|, |integer->char| returns\nthat character. These procedures implement order-preserving\nisomorphisms between the set of characters under the |char<=?|\nordering and some subset of the integers under the |<=|\nordering. That is, if\n@lisp\n   (char<=? a b) => #t  ,(bold \"and\")  (<= x y) => #t\n@end lisp\nand x and y are in the domain of |integer->char|, then\n@lisp\n   (<= (char->integer a)\n       (char->integer b))         =>  #t\n\n  (char<=? (integer->char x)\n           (integer->char y))     =>  #t\n@end lisp\n|integer->char| accepts an exact number between 0 and #xD7FFF or between\n#xE000 and #x10FFFF, if UTF8 encoding is used. Otherwise it accepts a\nnumber between0 and #xFF." :similar (char->integer))

(char->integer :see integer->char)
(char-downcase :type procedure :synopsis "(char-upcase char)\n(char-downcase char)" :description "These procedures return a character |char2| such that\n|(char-ci=? char char2)|. In addition, if char is alphabetic, then the\nresult of |char-upcase| is upper case and the result of |char-downcase| is\nlower case." :similar (char-upcase))

(char-upcase :see char-downcase)
(char-foldcase :type extended :synopsis "(char-foldcase char)" :description "This procedure applies the Unicode simple case folding algorithm and returns\nthe result. Note that language-sensitive folding is not used. If\nthe argument is an uppercase letter, the result will be either a\nlowercase letter or the same as the argument if the lowercase letter\ndoes not exist." :similar ())


;; Source file "cond.c"

(make-condition-type :type extended :synopsis "(make-condition-type id  parent  slot-names)" :description "|Make-condition-type| returns a new condition type. |Id| must be a symbol\nthat serves as a symbolic name for the condition type. |Parent| must itself\nbe a condition type. |Slot-names| must be a list of symbols. It identifies\nthe slots of the conditions associated with the condition type.\n" :similar ())

(make-compound-condition-type :type extended :synopsis "(make-compound-condition-type id ct1 ...)" :description "|Make-compound-condition-type| returns a new condition type, built\nfrom the condition types |ct1|, ...\n|Id| must be a symbol  that serves as a symbolic name for the\ncondition type. The slots names of the new condition type is the\nunion of the slots of conditions |ct1| ...\n@l\n,(bold \"Note:\") This function is not defined in ,(srfi 34)." :similar ())

(condition-type? :type extended :synopsis "(condition-type? obj)" :description "Returns |#t| if |obj| is a condition type, and |#f| otherwise" :similar ())

(make-condition :type extended :synopsis "(make-condition type slot-name value  ...)" :description "|Make-condition| creates a condition value belonging condition type\n|type|. The following arguments must be, in turn, a slot name and an\narbitrary value. There must be such a pair for each slot of |type| and\nits direct and indirect supertypes. |Make-condition| returns the\ncondition value, with the argument values associated with their\nrespective slots.\n@lisp\n(let* ((ct (make-condition-type 'ct1 &condition '(a b)))\n       (c  (make-condition ct 'b 2 'a 1)))\n  (struct->list c))\n     => ((a . 1) (b . 2))\n@end lisp" :similar ())

(condition? :type extended :synopsis "(condition? obj)" :description "Returns |#t| if |obj| is a condition, and |#f| otherwise" :similar ())

(make-compound-condition :type extended :synopsis "(make-compound-condition condition0 condition1 ...)" :description "|Make-compound-condition| returns a compound condition belonging to\nall condition types that the |conditioni| belong to.\n\n|Condition-ref|, when applied to a compound condition will return\n the value from the first of the |conditioni| that has such a slot." :similar ())

(condition-ref :type extended :synopsis "(condition-ref condition slot-name)" :description "|Condition| must be a condition, and |slot-name| a symbol. Moreover,\n|condition| must belong to a condition type which has a slot name called\n|slot-name|, or one of its (direct or indirect) supertypes must have the\nslot. |Condition-ref| returns the value associated with |slot-name|.\n@lisp\n(let* ((ct (make-condition-type 'ct1 &condition '(a b)))\n       (c  (make-condition ct 'b 2 'a 1)))\n  (condition-ref c 'b))\n     => 2\n@end lisp" :similar ())

(condition-set! :type extended :synopsis "(condition-set! condition slot-name obj)" :description "|Condition| must be a condition, and |slot-name| a symbol. Moreover,\n|condition| must belong to a condition type which has a slot name called\n|slot-name|, or one of its (direct or indirect) supertypes must have the\nslot. |Condition-set!| change the value associated with |slot-name| to |obj|.\n@l\n,(bold \"Note\"): Whereas |condition-ref| is defined in ,(srfi 35),\n|confition-set!| is not." :similar ())

(condition-has-type? :type extended :synopsis "(condition-has-type? condition condition-type)" :description "|Condition-has-type?| tests if |condition| belongs to |condition-type|.\nIt returns |#t| if any of condition 's types includes |condition-type|\neither directly or as an ancestor and |#f| otherwise.\n@lisp\n (let* ((ct1 (make-condition-type 'ct1 &condition '(a b)))\n        (ct2 (make-condition-type 'ct2 ct1 '(c)))\n        (ct3 (make-condition-type 'ct3 &condition '(x y z)))\n        (c   (make-condition ct2 'a 1 'b 2 'c 3)))\n  (list (condition-has-type? c ct1)\n     (condition-has-type? c ct2)\n     (condition-has-type? c ct3)))\n    => (#t #t #f)\n@end lisp" :similar ())

(extract-condition :type extended :synopsis "(extract-condition condition  condition-type)" :description "|Condition| must be a condition belonging to |condition-type|.\n|Extract-condition| returns a condition of |condition-type|\nwith the slot values specified by |condition|. The new condition\nis always allocated.\n@lisp\n(let* ((ct1 (make-condition-type 'ct1 &condition '(a b)))\n       (ct2 (make-condition-type 'ct2 ct1 '(c)))\n       (c2  (make-condition ct2 'a 1 ' b 2 'c 3))\n       (c1  (extract-condition c2 ct1)))\n  (list (condition-has-type? c1 ct2)\n     (condition-has-type? c1 ct1)))\n      => (#f #t)\n@end lisp" :similar ())

(raise :type r7rs-procedure :synopsis "(raise obj)" :description "Invokes the current exception handler on |obj|. The handler is called in\nthe dynamic environment of the call to |raise|, except that the current\nexception handler is that in place for the call to |with-handler|\nthat installed the handler being called.\n\n@lisp\n(with-handler (lambda (c)\n             (format \"value ~A was raised\" c))\n   (raise 'foo)\n   (format #t \"never printed\\\\n\"))\n          => \"value foo was raised\"\n@end lisp" :similar ())


;; Source file "cpointer.c"


;; Source file "dynload.c"


;; Source file "env.c"

(module? :type extended :synopsis "(module? object)" :description "Returns |#t| if |object| is a module and |#f| otherwise.\n@lisp\n(module? (find-module 'ST\\klos))  => #t\n(module? 'ST\\klos)                => #f\n(module? 123 'no)                => no\n@end lisp" :similar ())

(find-module :type extended :synopsis "(find-module name)\n(find-module name default)" :description "STklos modules are first class objects and |find-module| returns the\nmodule associated to |name| if it exists. If there is no module\nassociated to |name|, an error is signaled if no |default| is\nprovided, otherwise |find-module| returns |default|." :similar ())

(current-module :type extended :synopsis "(current-module)" :description "Returns the current module.\n@lisp\n(define-module M\n  (display\n      (cons (eq? (current-module) (find-module 'M))\n            (eq? (current-module) (find-module 'STklos)))))\n   @print{} (#t . #f)\n@end lisp" :similar ())

(module-name :type extended :synopsis "(module-name module)" :description "Returns the name (a symbol) associated to a |module|." :similar ())

(module-imports :type extended :synopsis "(module-imports module)" :description "Returns the list of modules that |module| (fully) imports." :similar ())

(module-exports :type extended :synopsis "(module-exports module)" :description "Returns the list of symbols exported by |module|. Note that this function\nreturns the list of symbols given in the module |export| clause and that\nsome of these symbols can be not yet defined." :similar ())

(module-symbols :type extended :synopsis "(module-symbols module)" :description "Returns the list of symbols already defined in |module|." :similar ())

(all-modules :type extended :synopsis "(all-modules)" :description "Returns the list of all the living modules." :similar ())

(symbol-value :type extended :synopsis "(symbol-value symbol module)\n(symbol-value symbol module default)" :description "Returns the value bound to |symbol| in |module|. If |symbol| is not bound,\nan error is signaled if no |default| is provided, otherwise |symbol-value|\nreturns |default|." :similar ())


;; Source file "error.c"


;; Source file "extend.c"


;; Source file "ffi.c"


;; Source file "fixnum.c"

(fixnum? :type extended :synopsis "(fixnum? obj)" :description "Returns |#t| if obj is an exact integer within the fixnum range,\n|#f| otherwise." :similar ())

(fixnum-width :type extended :synopsis "(fixnum-width)" :description "Returns the number of bits used to represent a fixnum number" :similar ())

(greatest-fixnum :type extended :synopsis "(least-fixnum)\n(greatest-fixnum)" :description "These procedures return the minimum value and the maximum value of\nthe fixnum range." :similar (least-fixnum))

(least-fixnum :see greatest-fixnum)
(fxzero? :type extended :synopsis "(fxzero? obj)" :description "|fxzero?| returns |#t| if |obj| is the fixnum zero and returns\n|#f| if it is a non-zero fixnum.\n@lisp\n  (fxzero? #f)             =>  error\n  (fxzero? (expt 100 100)) =>  error\n  (fxzero? 0)              =>  #t\n  (fxzero? 1)              =>  #f\n@end lisp" :similar ())

(fxnegative? :type extended :synopsis "(fxpositive? obj)\n(fxnegative? obj)" :description "|fxpositive?| returns |#t| if |obj| is a positive fixnum and returns\n|#f| if it is a non-positive fixnum. |fxnegative?| can be used to test\nif a fixnum is negative.\n@lisp\n  (fxpositive? #f)             =>  error\n  (fxpositive? (expt 100 100)) =>  error\n  (fxpositive? 0)              =>  #f\n  (fxpositive? 1)              =>  #t\n  (fxpositive? -1)             =>  #f\n  (fxnegative? 0)              =>  #f\n  (fxnegative? 1)              =>  #f\n  (fxnegative? -1)             =>  #t\n@end lisp" :similar (fxpositive?))

(fxpositive? :see fxnegative?)
(fxeven? :type extended :synopsis "(fxodd? obj)" :description "|fxodd?| returns |#t| if |obj| is a odd fixnum and returns\n|#f| if it is an even fixnum.\n@lisp\n  (fxodd? #f)             =>  error\n  (fxodd? (expt 100 100)) =>  error\n  (fxodd? 0)              =>  #f\n  (fxodd? 1)              =>  #t\n  (fxodd? 4)              =>  #f\n  (fxeven? 0)             =>  #t\n  (fxeven? 1)             =>  #f\n  (fxeven? 4)             =>  #t\n@end lisp" :similar (fxodd?))

(fxodd? :see fxeven?)
(fxneg :type extended :synopsis "(fx+ fx1 fx2)\n(fx- fx1 fx2)\n(fx* fx1 fx2)\n(fxquotient fx1 fx2)\n(fxremainder fx1 fx2)\n(fxmodulo fx1 fx2)\n(fxabs fx)\n(fxneg fx)" :description "These procedures compute (respectively) the sum, the difference, the product,\nthe quotient and the remainder and modulo of the fixnums |fx1| and |fx2|.\nThe call of  |fx-| with one parameter |fx| computes the opposite of |fx|, and\nis equivalent in a call of |fxneg| with this parameter. |fxabs|\ncomputes the absolute value of |fx|." :similar (fxabs fxmodulo fxremainder fxquotient fx* fx- fx+))

(fxabs :see fxneg)
(fxmodulo :see fxneg)
(fxremainder :see fxneg)
(fxquotient :see fxneg)
(fx* :see fxneg)
(fx- :see fxneg)
(fx+ :see fxneg)
(fxsqrt :type extended :synopsis "(fxsquare fx1)\n(fxsqrt fx1)" :description "These procedures compute (respectively) the square and the square root\nof the fixnum |fx1|.\n|fxsqrt| id semantically equivalent to exact-integer-sqrt (not sqrt), so\nthat |(fxsqrt n)| returns two values |a|, |b|, such that |a*a+b|=|n|.\n@lisp\n  (fxsqrt #f)             =>  error\n  (fxdqrt (expt 100 100)) =>  error\n  (fxsqrt -1)             =>  error\n  (fxsqrt 0)              =>  0, 0\n  (fxsqrt 1)              =>  1, 0\n  (fxsqrt 6)              =>  2, 2\n@end lisp" :similar (fxsquare))

(fxsquare :see fxsqrt)
(fxmin :type extended :synopsis "(fxmax fx1 fx2 ...)\n(fxmin fx1 fx2 ...)" :description "These procedures return the maximum or minimum of their fixnum arguments.\n@lisp\n(fxmax 3 4)              =>  4\n(fxmax 3.9 4)            =>  error\n(fxmax)                  =>  error\n(fxmax 2 -1 3)           =>  3\n@end lisp" :similar (fxmax))

(fxmax :see fxmin)
(fx=? :type extended :synopsis "(fx<? fx1 fx2 ...)\n(fx<=? fx1 fx2 ...)\n(fx>? fx1 fx2 ...)\n(fx>=? fx1 fx2 ...)\n(fx=? fx1 fx2 ...)" :description "These are SRFI-143 procedures that compare the fixnums |fx1|, |fx2|, and so on.\n|fx<?| and |fx>?| return |#t| if the arguments are in strictly\nincreasing/decreasing order;\n|fx<=?| and |fx>=?| do the same, but admit equal neighbors;\n|fx=?| returns |#t| if the arguments are all equal." :similar (fx>=? fx>? fx<=? fx<?))

(fx>=? :see fx=?)
(fx>? :see fx=?)
(fx<=? :see fx=?)
(fx<? :see fx=?)
(fxxor :type extended :synopsis "(fxnot fx1)\n(fxand fx ...)\n(fxior fx ...)\n(fxxor fx ...)" :description "These procedures are specified in SRFI-143, and they return\n(respectively) the bitwise not, and, inclusive or and exclusive\nor of their arguments, which must be fixnums.\n@lisp\n(fxnot 1)              => -2\n(fxnot 0)              => -1\n(fxand #x1010 #x1011)  => 4112  ; = #x1010\n(fxior #x1010 #x1011)  => 4113  ; = #x1011\n(fxxor #x1010 #x1011)  => 1     ; = #x0001\n@end lisp" :similar (fxior fxand fxnot))

(fxior :see fxxor)
(fxand :see fxxor)
(fxnot :see fxxor)
(fxarithmetic-shift :type extended :synopsis "(fxarithmetic-shift-right fx count)\n(fxarithmetic-shift-left fx count)\n(fxarithmetic-shift fx count)" :description "These procedures are specified in SRFI-143, and they perform\nbitwise right-shift, left-shft and shift with arbitrary direction\non fixnums. The strictly left and right shifts are more efficient.\n@lisp\n(fxarithmetic-shift-right #b100110 3) =>   4 ; = #b100\n(fxarithmetic-shift-left  #b100110 3) => 304 ; = #b100110000\n(fxarithmetic-shift #b101 2)          => 20  ; = #b10100\n(fxarithmetic-shift #b101 -2)         =>  1  ; =#b1\n@end lisp" :similar (fxarithmetic-shift-left fxarithmetic-shift-right))

(fxarithmetic-shift-left :see fxarithmetic-shift)
(fxarithmetic-shift-right :see fxarithmetic-shift)
(fxlength :type extended :synopsis "(fxlength fx)" :description "This is a SRFI-143 procedure that returns the length of the fixnum in\nbits (that is, the number of bits necessary to represent the number).\n@lisp\n(fxlength #b101)          =>  3\n(fxlength #b1101)         =>  4\n(fxlength #b0101)         =>  3\n@end lisp" :similar ())

(fxif :type extended :synopsis "(fxif mask fx1 fx2)" :description "This is a SRFI-143 procedure that merge the fixnum bitstrings |fx1| and |fx2|, with\nbitstring  mask determining from which string to take each bit. That is, if the kth bit\nof mask is 1, then the kth bit of the result is the kth bit of |fx1|, otherwise the kth\nbit of |fx2|.\n@lisp\n(fxif 3 1 8)                            => 9\n(fxif 3 8 1)                            => 0\n(fxif 1 1 2)                            => 3\n(fxif #b00111100 #b11110000 #b00001111) => #b00110011\n@end lisp" :similar ())

(fxbit-set? :type extended :synopsis "(fxbit-set? index fx)" :description "This is a SRFI-143 procedure that returns |#t| if the |index|-th bit of\n|fx|.\n@lisp\n(fxbit-set? 1 3)          => #t\n(fxbit-set? 2 7)          => #t\n(fxbit-set? 3 6)          => #f\n(fxbit-set? 5 #b00111100) => #t\n@end lisp" :similar ())

(fxcopy-bit :type extended :synopsis "(fxcopy-bit index fx value)" :description "This is a SRFI-143 procedure that sets the |index|-th bit if |fx|\nto one if |value| is |#t|, and to zero if |value| is |#f|.\n@lisp\n(fxcopy-bit 2 3 #t)          =>  7\n(fxcopy-bit 2 7 #f)          =>  3\n(fxcopy-bit 5 #b00111100 #f) => 28 ; = #b00011100\n@end lisp" :similar ())

(fxbit-count :type extended :synopsis "(fxbit-count fx1)" :description "This is a SRFI-143 procedure that returns the quantity of bits equal to one in\nthe fixnum |fx| (that is, computes its Hamming weight).\n@lisp\n(fxbit-count 8)                         => 1\n(fxbit-count 3)                         => 2\n(fxbit-count 7)                         => 3\n(fxbit-count #b00111010)                => 4\n@end lisp" :similar ())

(fxfirst-set-bit :type extended :synopsis "(fxfirst-set-bit fx1)" :description "This is a SRFI-143 procedure that returns the index of the first (smallest index)\n1 bit in bitstring |fx|. Returns -1 if |fx| contains no 1 bits (i.e., if |fx|\nis zero).\n@lisp\n(fxfirst-set-bit  8)                         => 3\n(fxfirst-set-bit  3)                         => 0\n(fxfirst-set-bit  7)                         => 0\n(fxfirst-set-bit  #b10110000)                => 4\n@end lisp" :similar ())

(fxbit-field :type extended :synopsis "(fxbit-field fx1 start end)" :description "This is a SRFI-143 procedure that extracts a bit field from the fixnum |fx1|.\nThe bit field is the sequence of bits between |start| (including) and |end|\n(excluding)\n@lisp\n(fxbit-field  #b10110000 3 5)  => 6 ; = #b110\n@end lisp" :similar ())

(fxbit-field-rotate :type extended :synopsis "(fxbit-field-rotate fx)" :description "This is a SRFI-143 procedure that returns fx with the field cyclically permuted\nby count bits towards high-order.\n@lisp\n(fxbit-field-rotate #b101011100 -2 1 5)     => 342  = #b101010110\n(fxbit-field-rotate #b101011011110 -3 2 10) => 3034 = #b101111011010\n(fxbit-field-rotate #b101011011110 3 2 10)  => 2806 = #b101011110110\n@end lisp" :similar ())

(fxbit-field-reverse :type extended :synopsis "(fxbit-field-reverse fx)" :description "This is a SRFI-143 procedure that returns fx with the order of the bits in the\nfield reversed.\n@lisp\n(fxbit-field-reverse #b101011100 1 5)     => #b101001110\n(fxbit-field-reverse #b101011011110 2 10) => #b101110110110\n@end lisp" :similar ())

(fx+/carry :type extended :synopsis "(fx+/carry i j k)" :description "Returns two values: |i|+|j|+|k|, and carry: it is the value of the computation\n@lisp\n(let*-values (((s) (+ i j k))\n              ((q r) (balanced/ s (expt 2 fx-width))))\n  (values r q))\n@end lisp" :similar ())

(fx-/carry :type extended :synopsis "(fx-/carry i j k)" :description "Returns two values: |i|-|j|-|k|, and carry: it is the value of the computation\n@lisp\n(let*-values (((s) (- i j k))\n              ((q r) (balanced/ s (expt 2 fx-width))))\n  (values r q))\n@end lisp" :similar ())


;; Source file "fport.c"

(open-input-file :type procedure :synopsis "(open-input-file filename)" :description "Takes a string naming an existing file and returns an input port capable\nof delivering characters from the file. If the file cannot be opened,\nan error is signalled.\n@l\n,(bold \"Note:\") if |filename| starts with the string ,(code  (q \"| \")),\nthis procedure returns a pipe port. Consequently, it is not possible to\nopen a file whose name starts with those two characters." :similar ())

(open-output-file :type procedure :synopsis "(open-output-file filename)" :description "Takes a string naming an output file to be created and returns an output\nport capable of writing characters to a new file by that name. If the file\ncannot be opened, an error is signalled. If a file with the given name\nalready exists, it is rewritten.\n@l\n,(bold \"Note:\") if |filename| starts with the string ,(code  (q \"| \")),\nthis procedure returns a pipe port. Consequently, it is not possible to\nopen a file whose name starts with those two characters." :similar ())

(output-file-port? :type extended :synopsis "(input-file-port? obj)\n(output-file-port? obj)" :description "Returns |#t| if |obj| is a file input port or a file output port respectively,\notherwise returns #f." :similar (input-file-port?))

(input-file-port? :see output-file-port?)
(open-file :type extended :synopsis "(open-file filename mode)" :description "Opens the file whose name is |filename| with the specified string\n|mode| which can be:\n,(itemize\n(item [|\"r\"| to open file for reading. The stream is positioned at\nthe beginning of the file.])\n\n(item [|\"r+\"| to open file for reading and writing.  The stream is\npositioned at the beginning of the file.])\n\n(item [|\"w\"| to truncate file to zero length or create file for writing.\nThe stream is positioned at the beginning of the file.])\n\n(item [|\"w+\"| to open  file for reading and writing. The file is created\nif it does not exist, otherwise it is truncated. The stream is positioned\nat the beginning of the file.])\n\n(item [|\"a\"| to open for writing.  The file is created if  it  does\nnot exist. The stream is positioned at the end of the file.])\n\n(item [|\"a+\"| to open file for reading and writing. The file is created\nif it does not exist. The stream is positioned at the end of the file.])\n)\nIf the file can be opened, |open-file| returns the textual port associated\nwith the given file, otherwise it returns |#f|. Here again, the ``magic''\nstring \"@pipe \" permits to open a pipe port (in this case mode can only be\n|\"r\"| or |\"w\"|)." :similar ())

(port-file-name :type extended :synopsis "(port-file-name port)" :description "Returns the file name used to open |port|; |port| must be a file port." :similar ())

(load :type procedure :synopsis "(load filename)" :description "|Filename| should be a string naming an existing file containing Scheme\nexpressions. |Load| has been extended in STklos to allow loading of\nfile containing Scheme compiled code as well as object files\n(,(emph \"aka\") shared objects). The loading of object files is not available on\nall architectures. The value returned by |load| is ,(emph \"void\").\n@l\nIf the file whose name is |filename| cannot be located, |load| will try\nto find it in one of the directories given by ,(code (ref :mark \"load-path\"))\nwith the suffixes given by ,(code (ref :mark \"load-suffixes\"))." :similar ())

(try-load :type extended :synopsis "(try-load filename)" :description "|try-load| tries to load the file named |filename|. As |load|,\n|try-load| tries to find the file given the current load path\nand a set of suffixes if |filename| cannot be loaded. If |try-load|\nis able to find a readable file, it is loaded, and |try-load| returns\n|#t|. Otherwise,  |try-load| retuns |#f|." :similar ())


;; Source file "gnu-getopt.c"


;; Source file "hash.c"

(hash-table? :type extended :synopsis "(hash-table? obj)" :description "Returns |#t| if |obj| is a hash table, returns |#f| otherwise." :similar ())

(hash-table-size :type extended :synopsis "(hash-table-size hash)" :description "Returns the number of entries in the |hash|." :similar ())

(hash-table-equivalence-function :type extended :synopsis "(hash-table-equivalence-function hash)" :description "Returns the equivalence predicate used for keys in |hash|." :similar ())

(hash-table-hash-function :type extended :synopsis "(hash-table-hash-function hash)" :description "Returns the hash function used for keys in |hash|." :similar ())

(hash-table-set! :type extended :synopsis "(hash-table-set! hash key value)" :description "Enters an association between |key| and |value| in the|hash| table.\nThe value returned by |hash-table-set!| is ,(emph \"void\")." :similar ())

(hash-table-ref :type extended :synopsis "(hash-table-ref hash key)\n(hash-table-ref hash key thunk)" :description "Returns the value associated with |key| in the given |hash| table. If no\nvalue has been associated with |key| in |hash|, the specified |thunk| is\ncalled and its value is returned; otherwise an error is raised.\n@lisp\n(define h1 (make-hash-table))\n(hash-table-set! h1 'foo (list 1 2 3))\n(hash-table-ref  h1 'foo)                 =>  (1 2 3)\n(hash-table-ref  h1 'bar\n                    (lambda () 'absent))  =>  absent\n(hash-table-ref  h1 'bar)                 =>  error\n(hash-table-set! h1 '(a b c) 'present)\n(hash-table-ref  h1 '(a b c)\n                     (lambda () 'absent)) => absent\n\n(define h2 (make-hash-table equal?))\n(hash-table-set! h2 '(a b c) 'present)\n(hash-table-ref  h2 '(a b c))             => present\n@end lisp" :similar ())

(hash-table-ref/default :type extended :synopsis "(hash-table-ref/default hash key default)" :description "This function is equivalent to\n@lisp\n(hash-table-ref hash key (lambda () default))\n@end lisp" :similar ())

(hash-table-exists? :type extended :synopsis "(hash-table-exists? hash key)" :description "Returns |#t| if there is any association of |key| in\n|hash|. Returns |#f| otherwise." :similar ())

(hash-table-delete! :type extended :synopsis "(hash-table-delete! hash key)" :description "Deletes the entry for |key| in |hash|, if it exists. Result of\n|hash-table-delete!| is ,(emph \"void\").\n\n@lisp\n(define h (make-hash-table))\n(hash-table-set! h 'foo (list 1 2 3))\n(hash-table-ref h 'foo)                => (1 2 3)\n(hash-table-delete! h 'foo)\n(hash-table-ref h 'foo\n                  (lambda () 'absent)  => absent\n@end lisp" :similar ())

(hash-table-for-each :type extended :synopsis "(hash-table-for-each hash proc)\n(hash-table-walk hash proc)" :description "|Proc| must be a procedure taking two arguments. |Hash-table-for-each|\ncalls |proc| on each key/value association in |hash|, with the key as\nthe first argument and the value as the second.  The value returned by\n|hash-table-for-each| is ,(emph \"void\").\n ,(linebreak)\n,(bold \"Note:\") The order of application of |proc| is unspecified.\n ,(linebreak)\n,(bold \"Note:\") |hash-table-walk| is another name for |hash-table-for-each|\n(this is the name used in ,(link-srfi 69)).\n\n@lisp\n(let ((h   (make-hash-table))\n      (sum 0))\n  (hash-table-set! h 'foo 2)\n  (hash-table-set! h 'bar 3)\n  (hash-table-for-each h (lambda (key value)\n                           (set! sum (+ sum value))))\n  sum)           =>  5\n@end lisp" :similar (hash-table-walk))

(hash-table-walk :see hash-table-for-each)
(hash-table-map :type extended :synopsis "(hash-table-map hash proc)" :description "|Proc| must be a procedure taking two arguments. |Hash-table-map|\ncalls |proc| on each key/value association in |hash|, with the key as\nthe first argument and the value as the second.  The result of\n|hash-table-map| is a list of the values returned by |proc|, in an\nunspecified order.\n,(linebreak)\n,(bold \"Note:\") The order of application of |proc| is unspecified.\n@lisp\n(let ((h (make-hash-table)))\n  (dotimes (i 5)\n    (hash-table-set! h i (number->string i)))\n  (hash-table-map h (lambda (key value)\n                       (cons key value))))\n             => ((3 . \"3\") (4 . \"4\") (0 . \"0\") (1 . \"1\") (2 . \"2\"))\n@end lisp" :similar ())

(hash-table-hash :type extended :synopsis "(hash-table-hash obj)" :description "Computes a hash code for an object and returns this hash code as a\nnon negative integer. A property of |hash-table-hash| is that\n@lisp\n(equal? x y) => (equal? (hash-table-hash x) (hash-table-hash y)\n@end lisp\n\nas the the Common Lisp |sxhash| function from which this procedure is\nmodeled." :similar ())

(hash-table-stats :type extended :synopsis "(hash-table-stats hash)\n(hash-table-stats hash port)" :description "Prints  overall information about |hash|, such as the number of entries\nit contains, the number of buckets in its hash array, and the utilization\nof the buckets. Informations are printed on |port|. If no |port| is given\nto |hash-table-stats|, information are printed on the current output port\n(see ,(ref :mark \"current-output-port\"))." :similar ())


;; Source file "keyword.c"

(make-keyword :type extended :synopsis "(make-keyword s)" :description "Builds a keyword from the given |s|. The parameter |s| must be a symbol\nor a string.\n@lisp\n(make-keyword \"test\")    => #:test\n(make-keyword 'test)     => #:test\n(make-keyword \":hello\")  => #::hello\n@end lisp" :similar ())

(keyword? :type extended :synopsis "(keyword obj)" :description "Returns |#t| if |obj| is a keyword, otherwise returns |#f|.\n@lisp\n(keyword? 'foo)     => #f\n(keyword? ':foo)    => #t  ; depends of keyword-colon-position\n(keyword? 'foo:)    => #t  ; depends of keyword-colon-position\n(keyword? '#:foo)   => #t  ; always\n(keyword? :foo)     => #t  ; depends of keyword-colon-position\n(keyword? foo:)     => #t  ; depends of keyword-colon-position\n(keyword? #:foo)    => #t  ; always \n@end lisp" :similar ())

(keyword->string :type extended :synopsis "(keyword->string key)" :description "Returns the name of |key| as a string. The result does not contain a colon." :similar ())

(key-get :type extended :synopsis "(key-get list key)\n(key-get list key default)" :description "|List| must be a list of keywords and their respective values.\n|key-get| scans the |list| and returns the value\nassociated with the given |key|. If  |key| does\nnot appear in an odd position in |list|, the specified\n|default| is returned, or an error is raised if no |default| was\nspecified.\n@lisp\n(key-get '(#:one 1 #:two 2) #:one)     => 1\n(key-get '(#:one 1 #:two 2) #:four #f) => #f\n(key-get '(#:one 1 #:two 2) #:four)    => error\n@end lisp" :similar ())

(key-set! :type extended :synopsis "(key-set! list key value)" :description "|List| must be a list of keywords and their respective values.\n|key-set!| sets the value associated to |key| in the keyword list.\nIf the key is already present in |list|, the keyword list is\n,(emph \"physically\") changed.\n@lisp\n(let ((l (list #:one 1 #:two 2)))\n  (set! l (key-set! l #:three 3))\n  (cons (key-get l #:one)\n        (key-get l #:three)))            => (1 . 3)\n@end lisp" :similar ())

(key-delete! :type extended :synopsis "(key-delete  list key)\n(key-delete! list key)" :description "|List| must be a list of keywords and their respective values.\n|key-delete| remove the |key| and its associated value of the keyword\nlist. The key can be absent of the list.\n,(linebreak)\n|key-delete!| does the same job than |key-delete| by physically \nmodifying its |list| argument.\n@lisp\n(key-delete '(:one 1 :two 2) :two)    => (:one 1)\n(key-delete '(:one 1 :two 2) :three)  => (:one 1 :two 2)\n(let ((l (list :one 1 :two 2)))\n   (key-delete! l :two)\n   l)                                 =>  (:one 1)\n@end lisp" :similar (key-delete))

(key-delete :see key-delete!)

;; Source file "lib.c"


;; Source file "list.c"

(pair? :type procedure :synopsis "(pair? obj)" :description "|Pair?| returns |#t| if |obj| is a pair, and otherwise returns |#f|." :similar ())

(cons :type procedure :synopsis "(cons obj1 obj2)" :description "Returns a newly allocated pair whose car is obj1 and whose cdr is obj2.\nThe pair is guaranteed to be different (in the sense of eqv?) from every\nexisting object.\n@lisp\n    (cons 'a '())           =>  (a)\n    (cons '(a) '(b c d))    =>  ((a) b c d)\n    (cons \"a\" '(b c))       =>  (\"a\" b c)\n    (cons 'a 3)             =>  (a . 3)\n    (cons '(a b) 'c)        =>  ((a b) . c)\n@end lisp" :similar ())

(car :type procedure :synopsis "(car pair)" :description "Returns the contents of the car field of pair.\nNote that it is an error to take the |car| of the empty list.\n@lisp\n    (car '(a b c))          =>  a\n    (car '((a) b c d))      =>  (a)\n    (car '(1 . 2))          =>  1\n    (car '())               =>  error\n@end lisp" :similar ())

(cdr :type procedure :synopsis "(cdr pair)" :description "Returns the contents of the cdr field of pair.\nNote that it is an error to take the |cdr| of the empty list.\n@lisp\n    (cdr '((a) b c d))      =>  (b c d)\n    (cdr '(1 . 2))          =>  2\n    (cdr '())               =>  error\n@end lisp" :similar ())

(set-car! :type procedure :synopsis "(set-car! pair obj)" :description "Stores |obj| in the car field of |pair|.\nThe value returned by |set-car!| is ,(emph \"void\").\n@lisp\n   (define (f) (list 'not-a-constant-list))\n   (define (g) '(constant-list))\n   (set-car! (f) 3)\n   (set-car! (g) 3)             =>  error\n@end lisp" :similar ())

(set-cdr! :type procedure :synopsis "(set-cdr! pair obj)" :description "Stores |obj| in the cdr field of |pair|.\nThe value returned by |set-cdr!| is ,(emph \"void\").\n" :similar ())

(null? :type procedure :synopsis "(null? obj)" :description "Returns |#t| if |obj| is the empty list, otherwise returns |#f|." :similar ())

(list? :type procedure :synopsis "(list? obj)" :description "Returns |#t| if |obj| is a list, otherwise returns |#f|. By definition,\nall lists have finite length and are terminated by the empty list.\n@lisp\n   (list? '(a b c))     =>  #t\n   (list? '())          =>  #t\n   (list? '(a . b))     =>  #f\n   (let ((x (list 'a)))\n     (set-cdr! x x)\n     (list? x))         =>  #f\n@end lisp" :similar ())

(list :type procedure :synopsis "(list obj ...)" :description "Returns a newly allocated list of its arguments.\n@lisp\n   (list 'a (+ 3 4) 'c)            =>  (a 7 c)\n   (list)                          =>  ()\n@end lisp" :similar ())

(length :type procedure :synopsis "(length list)" :description "Returns the length of |list|.\n\n@lisp\n   (length '(a b c))               =>  3\n   (length '(a (b) (c d e)))       =>  3\n   (length '())                    =>  0\n@end lisp" :similar ())

(append :type procedure :synopsis "(append list ...)" :description "Returns a list consisting of the elements of the first list\nfollowed by the elements of the other lists.\n\n@lisp\n   (append '(x) '(y))              =>  (x y)\n   (append '(a) '(b c d))          =>  (a b c d)\n   (append '(a (b)) '((c)))        =>  (a (b) (c))\n@end lisp\n\nThe resulting list is always newly allocated, except that it shares\nstructure with the last list argument. The last argument may actually\nbe any object; an improper list results if the last argument is not a\nproper list.\n\n@lisp\n   (append '(a b) '(c . d))        =>  (a b c . d)\n   (append '() 'a)                 =>  a\n@end lisp" :similar ())

(reverse :type procedure :synopsis "(reverse list)" :description "Returns a newly allocated list consisting of the elements of |list| in\nreverse order.\n\n@lisp\n   (reverse '(a b c))              =>  (c b a)\n   (reverse '(a (b c) d (e (f))))  =>  ((e (f)) d (b c) a)\n@end lisp" :similar ())

(list-tail :type procedure :synopsis "(list-tail list k)" :description "Returns the sublist of |list| obtained by omitting the first |k| elements.\nIt is an error if list has fewer than |k| elements. List-tail could\nbe defined by\n@lisp\n   (define list-tail\n      (lambda (x k)\n         (if (zero? k)\n            x\n            (list-tail (cdr x) (- k 1)))))\n@end lisp" :similar ())

(list-ref :type procedure :synopsis "(list-ref list k)" :description "Returns the |k|th element of |list|. (This is the same as the car\nof |(list-tail list k)|.) It is an error if list has fewer than |k|\nelements.\n\n@lisp\n   (list-ref '(a b c d) 2)                 =>  c\n   (list-ref '(a b c d)\n             (inexact->exact (round 1.8))) =>  c\n@end lisp" :similar ())

(list-set! :type r7rs-procedure :synopsis "(list-set! list k obj)" :description "The |list-set!| procedure stores |obj| in element |k| of |list|.\nIt is an error if |k| is not a valid index of |list|.\n@lisp\n(let ((ls (list 'one 'two 'five!)))\n   (list-set! ls 2 'three)\n   ls)                              => (one two three)\n(list-set! ’(0 1 2) 1 \"oops\")       => error (constant list)\n@end lisp" :similar ())

(member :type r57rs-procedure :synopsis "(memq obj list)\n(memv obj list)\n(member obj list)\n(member obj list compare)" :description "These procedures return the first sublist of list whose car is |obj|,\nwhere the sublists of list are the non-empty lists returned by\n|(list-tail list k)| for |k| less than the length of list.\nIf |obj| does not occur in |list|, then |#f| (not the empty list) is\nreturned. |Memq| uses |eq?| to compare obj with the elements of list,\nwhile |memv| uses |eqv?| and |member| uses |compare|, if given, and \n|equal?| otherwise.\n\n@lisp\n   (memq 'a '(a b c))              =>  (a b c)\n   (memq 'b '(a b c))              =>  (b c)\n   (memq 'a '(b c d))              =>  #f\n   (memq (list 'a) '(b (a) c))     =>  #f\n   (member (list 'a)\n           '(b (a) c))             =>  ((a) c)\n   (member \"B\"\n           ’(\"a\" \"b\" \"c\")\n           string-ci=?)            => (\"b\" \"c\")\n   (memv 101 '(100 101 102))       =>  (101 102)\n@end lisp\n\n,(bold \"Note:\") As in R7RS, the |member| function accepts also a\ncomparison function." :similar (memv memq))

(memv :see member)
(memq :see member)
(assoc :type r57rs-procedure :synopsis "(assq obj alist)\n(assv obj alist)\n(assoc obj alist)\n(assoc obj alist compare)" :description "|Alist| (for \"association list\") must be a list of pairs. These procedures\nfind the first pair in |alist| whose car field is |obj|, and returns that\npair. If no pair in |alist| has |obj| as its car, then |#f| (not the empty\nlist) is returned. |Assq| uses |eq?| to compare |obj| with the car fields\nof the pairs in |alist|, while |assv| uses |eqv?| and |assoc| uses |equal?|.\n\n@lisp\n   (define e '((a 1) (b 2) (c 3)))\n   (assq 'a e)                =>  (a 1)\n   (assq 'b e)                =>  (b 2)\n   (assq 'd e)                =>  #f\n   (assq (list 'a) '(((a)) ((b)) ((c))))\n                              =>  #f\n   (assoc (list 'a) '(((a)) ((b)) ((c))))\n                              => ((a))\n   (assoc 2.0 '((1 1) (2 4) (3 9)) =)\n                              => (2 4)\n   (assv 5 '((2 3) (5 7) (11 13)))\n                              =>  (5 7)\n@end lisp\n\n,(bold \"Rationale:\") Although they are ordinarily used as predicates,\n|memq|, |memv|, |member|, |assq|, |assv|, and |assoc| do not have question\nmarks in their names because they return useful values rather than just\n|#t| or #|f|.\n\n,(bold \"Note:\") As in R7RS, the |assoc| function accepts also a\ncomparison function." :similar (assv assq))

(assv :see assoc)
(assq :see assoc)
(list-copy :type r7rs-procedure :synopsis "(list-copy obj)" :description "|list-copy| recursively copies trees of pairs. If |obj| is\nnot a pair, it is returned; otherwise the result is a new pair whose\n|car| and |cdr| are obtained by calling |list-copy| on\nthe |car| and |cdr| of |obj|, respectively." :similar ())

(pair-mutable? :type extended :synopsis "(pair-mutable? obj)" :description "Returns |#t| if |obj| is a mutable pair, otherwise returns |#f|.\n@lisp\n(pair-mutable? '(1 . 2))    => #f\n(pair-mutable? (cons 1 2))  => #t\n(pair-mutable? 12)          => #f\n@end lisp" :similar ())

(list* :type extended :synopsis "(list* obj ...)" :description "|list*| is like |list| except that the last argument to |list*| is\nused as the ,(emph \"cdr\") of the last pair constructed.\n@lisp\n   (list* 1 2 3)        => (1 2 . 3)\n   (list* 1 2 3 '(4 5)) => (1 2 3 4 5)\n   (list*)              => ()\n@end lisp" :similar ())

(last-pair :type extended :synopsis "(last-pair list)" :description "Returns the last pair of |list|.\n@lisp\n(last-pair '(1 2 3))   => (3)\n(last-pair '(1 2 . 3)) => (2 . 3)\n@end lisp" :similar ())

(filter! :type extended :synopsis "(filter  pred list)\n(filter! pred list)" :description "|Filter| returns all the elements of |list| that satisfy predicate\n|pred|. The |list| is not disordered: elements that appear in the\nresult list occur in the same order as they occur in the argument\nlist. |Filter!| does the same job than |filter| by physically\nmodifying its |list| argument\n@lisp\n(filter even? '(0 7 8 8 43 -4)) => (0 8 8 -4)\n(let* ((l1 (list 0 7 8 8 43 -4))\n       (l2 (filter! even? l1)))\n   (list l1 l2))                => ((0 8 8 -4) (0 8 8 -4))\n@end lisp\nAn error is signaled if |list| is a constant list." :similar (filter))

(filter :see filter!)
(append! :type extended :synopsis "(append! list ...)" :description "Returns a list consisting of the elements of the first list\nfollowed by the elements of the other lists.\nContrarily to |append|, the parameter lists (except the last one) are\nphysically modified: their last pair is changed to the value of the next\nlist in the |append!| formal parameter list.\n@lisp\n(let* ((l1 (list 1 2))\n       (l2 (list 3))\n       (l3 (list 4 5))\n       (l4 (append! l1 l2 l3)))\n  (list l1 l2 l3))  => ((1 2 3 4 5) (3 4 5) (4 5))\n@end lisp\nAn error is signaled if one of the given lists is a constant list." :similar ())

(reverse! :type extended :synopsis "(reverse! list)" :description "Returns a list consisting of the elements of |list| in reverse order.\nContrarily to |reverse|, the returned value is not newly allocated but\ncomputed \"in place\".\n\n@lisp\n(let ((l '(a b c)))\n  (list (reverse! l) l))        =>  ((c b a) (a))\n(reverse! '(a constant list))   =>  error\n@end lisp" :similar ())


;; Source file "misc.c"

(version :type extended :synopsis "(version)\n(implementation-version)" :description "Returns a string identifying the current version of the system. A\nversion is constituted of two numbers separated by a point: the version\nand the release numbers. Note that |implementation-version| corresponds\nto the ,(srfi 112) name of this function." :similar (implementation-version))

(implementation-version :see version)
(void :type extended :synopsis "(void)\n(void arg1 ...)" :description "Returns the special ,(emph \"void\") object. If arguments are passed to |void|,\nthey are evalued and simply ignored." :similar ())

(address-of :type extended :synopsis "(address-of obj)" :description "Returns the address of the object |obj| as an integer." :similar ())

(gc :type extended :synopsis "(gc)" :description "Force a garbage collection step." :similar ())

(uri-parse :type extended :synopsis "(uri-parse str)" :description "Parses the string |str| as a RFC-2396 URI and return a keyed list with the\nfollowing components\n,(itemize\n(item [|scheme| : the scheme used as a string (defaults to |\"file\"|)])\n(item [|user|: the user information (generally expressed as\n     |login:password|)])\n(item [|host| : the host as a string (defaults to \"\")])\n(item [|port| : the port as an integer (0 if no port specified)])\n(item [|path| : the path ])\n(item [|query| : the qury part of the URI as a string (defaults to the\nempty string)])\n(item [|fragment| : the fragment of the URI as a string (defaults to the\nempty string)])\n)\n@lisp\n(uri-parse \"http://google.com\")\n    => (:scheme \"http\" :user \"\" :host \"google.com\" :port 80\n        :path \"/\" :query \"\" :fragment \"\")\n(uri-parse \"http://stklos.net:8080/a/file?x=1;y=2#end\")\n    => (:scheme \"http\" :user \"\" :host \"stklos.net\" :port 8080\n        :path \"/a/file\" :query \"x=1;y=2\" :fragment \"end\")\n(uri-parse \"http://foo:secret@stklos.net:2000/a/file\")\n    => (:scheme \"http\" :user \"foo:secret\" :host \"stklos.net\"\n        :port 2000  :path \"/a/file\" :query \"\" :fragment \"\")\n(uri-parse \"/a/file\")\n   => (:scheme \"file\" :user \"\" :host \"\" :port 0 :path \"/a/file\"\n       :query \"\" :fragment \"\")\n(uri-parse \"\")\n   => (:scheme \"file\"  :user \"\" :host \"\" :port 0 :path \"\"\n       :query \"\" :fragment \"\")\n@end lisp" :similar ())

(string->html :type extended :synopsis "(string->html str)" :description "This primitive is a convenience function; it returns a string where\nthe HTML special chars are properly translated. It can easily written\nin Scheme, but this version is fast.\n@lisp\n(string->html \"Just a <test>\")\n   => \"Just a &lt;test&gt;\"\n@end lisp" :similar ())

(get-password :type extended :synopsis "(get-password)" :description "This primitive permits to enter a password (character echoing\nbeing turned off). The value returned by |get-password| is the entered\npassword as a string." :similar ())


;; Source file "md5.c"

(md5sum :type extended :synopsis "(md5sum obj)" :description "Return a string contening the md5 dum of |obj|. The given parameter can\nbe a string or an open input port." :similar ())


;; Source file "number.c"

(real-precision :type extended :synopsis "(real-precision)\n(real-precision value)" :description "This parameter object permits to change the default precision used\nto print real numbers.\n@lisp\n(real-precision)        => 15\n(define f 0.123456789)\n(display f)             => 0.123456789\n(real-precision 3)\n(display f)             => 0.123\n@end lisp" :similar ())

(accept-srfi-169-numbers :type extended :synopsis "(accept-srfi-169-numbers)\n(accept-srfi-169-numbers value)" :description "This parameter object permits to change the behavior of the reader\nwith underscores in numbers. Numbers with underscores are defined\nin ,(link-srfi 169). By default, this variable is true, meaning that\nunderscores are accepted in numbers.\n\n@lisp\n(accept-srfi-169-numbers)        => #t\n(symbol? '1_000_000)             => #f\n(number? '1_000_000)             => #t\n(accept-srfi-169-numbers #f)\n(symbol? '1_000_000)             => #t\n(number? '1_000_000)             => #f\n@end lisp" :similar ())

(integer? :type procedure :synopsis "(number? obj)\n(complex? obj)\n(real? obj)\n(rational? obj)\n(integer? obj)" :description "These numerical type predicates can be applied to any kind of\nargument, including non-numbers. They return |#t| if the object is of\nthe named type, and otherwise they return |#f|. In general, if a type\npredicate is true of a number then all higher type predicates are\nalso true of that number. Consequently, if a type predicate is\nfalse of a number, then all lower type predicates are also false of\nthat number.\n\nIf |z| is an inexact complex number, then |(real? z)| is true if and\nonly if |(zero? (imag-part z))| is true. If |x| is an inexact real\nnumber, then |(integer? x)| is true if and only if\n|(and (finite? x) (= x (round x)))|\n\n\n@lisp\n  (complex? 3+4i)         =>  #t\n  (complex? 3)            =>  #t\n  (real? 3)               =>  #t\n  (real? -2.5+0.0i)       =>  #t\n  (real? #e1e10)          =>  #t\n  (rational? 6/10)        =>  #t\n  (rational? 6/3)         =>  #t\n  (integer? 3+0i)         =>  #t\n  (integer? 3.0)          =>  #t\n  (integer? 3.2)          =>  #f\n  (integer? 8/4)          =>  #t\n  (integer? \"no\")         =>  #f\n  (complex? +inf.0)       =>  #t\n  (real? -inf.0)          =>  #t\n  (rational? +inf.0)      =>  #f\n  (integer? -inf.0)       =>  #f\n@end lisp\n" :similar (rational? real? complex? number?))

(rational? :see integer?)
(real? :see integer?)
(complex? :see integer?)
(number? :see integer?)
(bignum? :type extended :synopsis "(bignum? x)" :description "This predicates returns |#t| if |x| is an integer number too large to be\nrepresented with a native integer.\n@lisp\n(bignum? (expt 2 300))     => |#t|   (very likely)\n(bignum? 12)               => |#f|\n(bignum? \"no\")             => |#f|\n@end lisp" :similar ())

(inexact? :type procedure :synopsis "(exact? z)\n(inexact? z)" :description "These numerical predicates provide tests for the exactness of a\nquantity. For any Scheme number, precisely one of these predicates\nis true." :similar (exact?))

(exact? :see inexact?)
(>= :type procedure :synopsis "(= z1 z2 z3 ...)\n(< x1 x2 x3 ...)\n(> x1 x2 x3 ...)\n(<= x1 x2 x3 ...)\n(>= x1 x2 x3 ...)" :description "These procedures return |#t| if their arguments are (respectively):\nequal, monotonically increasing, monotonically decreasing,\nmonotonically nondecreasing, or monotonically nonincreasing.\n@lisp\n(= +inf.0 +inf.0)           =>  #t\n(= -inf.0 +inf.0)           =>  #f\n(= -inf.0 -inf.0)           =>  #t\n@l\nFor any finite real number x:\n@l\n(< -inf.0 x +inf.0)         =>  #t\n(> +inf.0 x -inf.0)         =>  #t\n@end lisp" :similar (<= > < =))

(<= :see >=)
(> :see >=)
(< :see >=)
(= :see >=)
(even? :type procedure :synopsis "(finite? z)\n(infinite? z)\n(zero? z)\n(positive? x)\n(negative? x)\n(odd? n)\n(even? n)" :description "These numerical predicates test a number for a particular property,\nreturning |#t| or |#f|.\n@lisp\n(positive? +inf.0)          ==>  #t\n(negative? -inf.0)          ==>  #t\n(finite? -inf.0)            ==>  #f\n(infinite? +inf.0)          ==>  #t\n@end lisp" :similar (odd? negative? positive? zero? infinite? finite?))

(odd? :see even?)
(negative? :see even?)
(positive? :see even?)
(zero? :see even?)
(infinite? :see even?)
(finite? :see even?)
(nan? :type r7rs-procedure :synopsis "(nan? z)" :description "The |nan?| procedure returns #t on |+nan.0|, and on complex\nnumbers if their real or imaginary parts or both are |+nan.0|.\nOtherwise it returns #f.\n\n@lisp\n(nan? +nan.0)          =>  #t\n(nan? 32)              =>  #f\n(nan? +nan.0+5.0i)     =>  #t\n(nan? 1+2i)            =>  #f\n@end lisp" :similar ())

(min :type procedure :synopsis "(max x1 x2 ...)\n(min x1 x2 ...)" :description "These procedures return the maximum or minimum of their arguments.\n\n@lisp\n(max 3 4)              =>  4    ; exact\n(max 3.9 4)            =>  4.0  ; inexact\n@end lisp\nFor any real number x:\n@lisp\n(max +inf.0 x)         =>  +inf.0\n(min -inf.0 x)         =>  -inf.0\n@end lisp\n\n,(bold \"Note:\") If any argument is inexact, then the result will also be\ninexact" :similar (max))

(max :see min)
(* :type procedure :synopsis "(+ z1 ...)\n(* z1 ...)" :description "These procedures return the sum or product of their arguments.\n@lisp\n(+ 3 4)                 =>  7\n(+ 3)                   =>  3\n(+)                     =>  0\n(+ +inf.0 +inf.0)       =>  +inf.0\n(+ +inf.0 -inf.0)       =>  +nan.0\n(* 4)                   =>  4\n(*)                     =>  1\n(* 5 +inf.0)            =>  +inf.0\n(* -5 +inf.0)           =>  -inf.0\n(* +inf.0 +inf.0)       =>  +inf.0\n(* +inf.0 -inf.0)       =>  -inf.0\n(* 0 +inf.0)            =>  +nan.0\n@end lisp\n,(bold \"Note:\") For any finite number z:\n@lisp\n(+ +inf.0 z)            =>  +inf.0\n(+ -inf.0 z)            =>  -inf.0\n@end lisp" :similar (+))

(+ :see *)
(/ :type procedure :synopsis "(- z)\n(- z1 z2)\n(/ z)\n(/ z1 z2 ...)" :description "With two or more arguments, these procedures return the difference or quotient\nof their arguments, associating to the left. With one argument, however,\nthey return the additive or multiplicative inverse of their argument.\n\n@lisp\n(- 3 4)                 =>  -1\n(- 3 4 5)               =>  -6\n(- 3)                   =>  -3\n(- +inf.0 +inf.0)       => +nan.0\n(/ 3 4 5)               =>  3/20\n(/ 3)                   =>  1/3\n(/ 0.0)                 => +inf.0\n(/ 0)                   => error (division by 0)\n@end lisp" :similar (-))

(- :see /)
(abs :type procedure :synopsis "(abs x)" :description "|Abs| returns the absolute value of its argument.\n@lisp\n(abs -7)                =>  7\n(abs -inf.0)            => +inf.0\n@end lisp" :similar ())

(modulo :type procedure :synopsis "(quotient n1 n2)\n(remainder n1 n2)\n(modulo n1 n2)" :description "These procedures implement number-theoretic (integer) division. n2 should\nbe non-zero. All three procedures return integers.\n@l\nIf |n1/n2| is an integer:\n\n@lisp\n(quotient n1 n2)   => n1/n2\n(remainder n1 n2)  => 0\n(modulo n1 n2)     => 0\n@end lisp\n\nIf n1/n2 is not an integer:\n\n@lisp\n(quotient n1 n2)   => nq\n(remainder n1 n2)  => nr\n(modulo n1 n2)     => nm\n@end lisp\n\nwhere |nq| is |n1/n2| rounded towards zero, 0 < abs(nr) < abs(n2),\n0 < abs(nm) < abs(n2), |nr| and |nm| differ from n1 by a multiple of n2,\n|nr| has the same sign as n1, and |nm| has the same sign as n2.\n@l\nFrom this we can conclude that for integers |n1| and |n2| with |n2| not\nequal to 0,\n@lisp\n (= n1 (+ (* n2 (quotient n1 n2))\n          (remainder n1 n2)))   =>  #t\n@end lisp\nprovided all numbers involved in that computation are exact.\n\n@lisp\n(modulo 13 4)           =>  1\n(remainder 13 4)        =>  1\n\n(modulo -13 4)          =>  3\n(remainder -13 4)       =>  -1\n\n(modulo 13 -4)          =>  -3\n(remainder 13 -4)       =>  1\n\n(modulo -13 -4)         =>  -1\n(remainder -13 -4)      =>  -1\n\n(remainder -13 -4.0)    =>  -1.0  ; inexact\n@end lisp" :similar (remainder quotient))

(remainder :see modulo)
(quotient :see modulo)
(lcm :type procedure :synopsis "(gcd n1 ...)\n(lcm n1 ...)" :description "These procedures return the greatest common divisor or least common\nmultiple of their arguments. The result is always non-negative.\n\n@lisp\n(gcd 32 -36)            =>  4\n(gcd)                   =>  0\n(lcm 32 -36)            =>  288\n(lcm 32.0 -36)          =>  288.0  ; inexact\n(lcm)                   =>  1\n@end lisp" :similar (gcd))

(gcd :see lcm)
(denominator :type procedure :synopsis "(numerator q)\n(denominator q)" :description "These procedures return the numerator or denominator of their argument; the\nresult is computed as if the argument was represented as a fraction in\nlowest terms. The denominator is always positive. The denominator of\n0 is defined to be 1.\n@lisp\n(numerator (/ 6 4))  =>  3\n(denominator (/ 6 4))  =>  2\n(denominator\n(exact->inexact (/ 6 4))) => 2.0\n@end lisp" :similar (numerator))

(numerator :see denominator)
(round :type procedure :synopsis "(floor x)\n(ceiling x)\n(truncate x)\n(round x)" :description "These procedures return integers. |Floor| returns the largest integer not\nlarger than |x|. |Ceiling| returns the smallest integer not smaller than |x|.\n|Truncate| returns the integer closest to |x| whose absolute value is not\nlarger than the absolute value of |x|. |Round| returns the closest integer\nto |x|, rounding to even when |x| is halfway between two integers.\n@l\n,(bold \"Rationale:\") |Round| rounds to even for consistency with the default\nrounding mode specified by the IEEE floating point standard.\n@l\n,(bold \"Note:\") If the argument to one of these procedures is inexact, then the\nresult will also be inexact. If an exact value is needed, the result should\nbe passed to the |inexact->exact| procedure.\n\n@lisp\n\n(floor -4.3)          =>  -5.0\n(ceiling -4.3)        =>  -4.0\n(truncate -4.3)       =>  -4.0\n(round -4.3)          =>  -4.0\n\n(floor 3.5)           =>  3.0\n(ceiling 3.5)         =>  4.0\n(truncate 3.5)        =>  3.0\n(round 3.5)           =>  4.0  ; inexact\n\n(round 7/2)           =>  4    ; exact\n(round 7)             =>  7\n@end lisp" :similar (truncate ceiling floor))

(truncate :see round)
(ceiling :see round)
(floor :see round)
(atan :type procedure :synopsis "(exp z)\n(log z)\n(log z b)\n(sin z)\n(cos z)\n(tan z)\n(asin z)\n(acos z)\n(atan z)\n(atan y x)" :description "These procedures compute the usual transcendental functions. |Log| computes the\nnatural logarithm of z (not the base ten logarithm). |Asin|, |acos|,\nand |atan| compute arcsine, arccosine, and  arctangent, respectively.\nThe two-argument variant of |log| computes the logarithm of x in base b as\n@lisp\n(/ (log x) (log b))\n@end lisp\nThe two-argument variant of |atan| computes\n@lisp\n(angle (make-rectangular x y))\n@end lisp\n\nWhen it is possible these procedures produce a real result from a real\nargument." :similar (acos asin tan cos sin log exp))

(acos :see atan)
(asin :see atan)
(tan :see atan)
(cos :see atan)
(sin :see atan)
(log :see atan)
(exp :see atan)
(sqrt :type procedure :synopsis "(sqrt z)" :description "Returns the principal square root of |z|. The result will have either\npositive real part, or zero real part and non-negative imaginary part." :similar ())

(expt :type procedure :synopsis "(expt z1 z2)" :description "Returns |z1| raised to the power |z2|.\n@l\n,(bold \"Note:\") |0,(sup \"z\")| is 1 if |z = 0| and |0| otherwise." :similar ())

(angle :type procedure :synopsis "(make-rectangular x1 x2)\n(make-polar x3 x)\n(real-part z)\n(imag-part z)\n(magnitude z)\n(angle z)" :description "If x1, x2, x3, and x4 are real numbers and z is a complex number such that\n@l\n|z = x1 + x2.i = x3 . e,(sup \"i.x4\")|\n@l\nThen\n@lisp\n(make-rectangular x1 x2)       => z\n(make-polar x3 x4)             => z\n(real-part z)                  => x1\n(imag-part z)                  => x2\n(magnitude z)                  => abs(x3)\n(angle z)                      => xa\n@end lisp\nwhere\n|-,(symbol \"pi\") < xa <= ,(symbol \"pi\")| with |xa = x4 + 2,(symbol \"pi\")n|\nfor some integer n.\n@lisp\n(angle +inf.0)                 => 0.0\n(angle -inf.0)                 => 3.14159265358979\n@end lisp\n@l\n,(bold \"Note:\") |Magnitude| is the same as |abs| for a real argument." :similar (magnitude imag-part real-part make-polar make-rectangular))

(magnitude :see angle)
(imag-part :see angle)
(real-part :see angle)
(make-polar :see angle)
(make-rectangular :see angle)
(inexact->exact :type procedure :synopsis "(exact->inexact z)\n(inexact->exact z)" :description "|Exact->inexact| returns an inexact representation of z.\nThe value returned is the inexact number that is numerically closest to\nthe argument.\n|Inexact->exact| returns an exact representation of z.\nThe value returned is the exact number that is numerically closest to\nthe argument." :similar (exact->inexact))

(exact->inexact :see inexact->exact)
(number->string :type procedure :synopsis "(number->string z)\n(number->string z radix)" :description "|Radix| must be an exact integer, either 2, 8, 10, or 16. If omitted, radix\ndefaults to 10. The procedure |number->string| takes a number and a radix\nand returns as a string an external representation of the given number in\nthe given radix such that\n@lisp\n(let ((number number)\n      (radix radix))\n  (eqv? number\n       (string->number (number->string number radix) radix)))\n@end lisp\nis true. It is an error if no possible result makes this expression true.\n@l\nIf |z| is inexact, the radix is 10, and the above expression can be\nsatisfied by a result that contains a decimal point, then the result\ncontains a decimal point and is expressed using the minimum number of digits\n(exclusive of exponent and trailing zeroes) needed to make the above expression\ntrue; otherwise the format of the result is unspecified.\n@l\nThe result returned by |number->string| never contains an explicit radix\nprefix.\n@l\n,(bold \"Note:\") The error case can occur only when |z| is not a complex number or\nis a complex number with a non-rational real or imaginary part.\n@l\n,(bold \"Rationale:\") If |z| is an inexact number represented using flonums, and\nthe radix is 10, then the above expression is normally satisfied by a result\ncontaining a decimal point. The unspecified case allows for infinities,\nNaNs, and non-flonum representations." :similar ())

(string->number :type procedure :synopsis "(string->number string)\n(string->number string radix)" :description "Returns a number of the maximally precise representation expressed by the\ngiven |string|. |Radix| must be an exact integer, either 2, 8, 10, or 16.\nIf supplied, |radix| is a default radix that may be overridden by an explicit\nradix prefix in |string| (e.g. ,(code \"\\\"#o177\\\"\")). If |radix| is not\n supplied, then\nthe default radix is 10. If |string| is not a syntactically valid notation\nfor a number, then |string->number| returns |#f|.\n@lisp\n(string->number \"100\")        =>  100\n(string->number \"100\" 16)     =>  256\n(string->number \"1e2\")        =>  100.0\n(string->number \"15##\")       =>  1500.0\n(string->number \"+inf.0\")     =>  +inf.0\n(string->number \"-inf.0\")     =>  -inf.0\n@end lisp\n" :similar ())

(decode-float :type extended :synopsis "(decode-float n)" :description "|decode-float| returns three exact integers: |significand|, |exponent|\nand |sign| (where |-1 <= sign <= 1|). The values returned by |decode-float|\nsatisfy:\n@lisp\nn = (* sign significand (expt 2 exponent))\n@end lisp\nHere is an example of |decode-float| usage.\n@lisp\n(receive l (decode-float -1.234) l)\n                    => (5557441940175192 -52 -1)\n(exact->inexact (* -1\n                    5557441940175192\n                    (expt 2 -52)))\n                    => -1.234\n@end lisp" :similar ())

(nan-negative? :type extended :synopsis "(nan-negative? nan)" :description "returns #t if the sign bit of |nan| is set and #f otherwise." :similar ())

(nan-quiet? :type extended :synopsis "(nan-quiet? nan)" :description "returns #t  if |nan| is a quiet NaN." :similar ())

(nan-payload :type extended :synopsis "(nan-payload nan)" :description "returns  the payload bits of |nan| as a positive exact integer." :similar ())

(nan=? :type extended :synopsis "(nan=? nan1 nan2)" :description "Returns #t if |nan1| and |nan2| have the same sign, quiet bit,\nand payload; and #f otherwise." :similar ())


;; Source file "object.c"


;; Source file "parameter.c"

(make-parameter :type extended :synopsis "(make-parameter init)\n(make-parameter init converter)" :description "Returns a new parameter object which is bound in the global dynamic\nenvironment to a cell containing the value returned by the call\n|(converter init)|. If the conversion procedure |converter| is not\nspecified the identity function is used instead.\n@l\nThe parameter object is a procedure which accepts zero or one\nargument. When it is called with no argument, the content of the\ncell bound to this parameter object in the current dynamic\nenvironment is returned. When it is called with one argument, the\ncontent of the cell bound to this parameter object in the current\ndynamic environment is set to the result of the call\n|(converter arg)|, where |arg| is the argument passed to the\nparameter object, and\nan unspecified value is returned.\n\n@lisp\n(define radix\n    (make-parameter 10))\n\n(define write-shared\n   (make-parameter\n      #f\n      (lambda (x)\n        (if (boolean? x)\n            x\n            (error 'write-shared \"bad boolean ~S\" x)))))\n\n (radix)           =>  10\n (radix 2)\n (radix)           =>  2\n (write-shared 0)  => error\n\n (define prompt\n   (make-parameter\n     123\n     (lambda (x)\n       (if (string? x)\n           x\n           (with-output-to-string (lambda () (write x)))))))\n\n (prompt)       =>  \"123\"\n (prompt \">\")\n (prompt)       =>  \">\"\n@end lisp" :similar ())

(parameter? :type extended :synopsis "(parameter? obj)" :description " Returns |#t| if |obj| is a parameter object, otherwise returns |#f|." :similar ())


;; Source file "path.c"


;; Source file "port.c"

(output-port? :type procedure :synopsis "(input-port? obj)\n(output-port? obj)" :description "Returns |#t| if |obj| is an input port or output port respectively,\notherwise returns #f." :similar (input-port?))

(input-port? :see output-port?)
(binary-port? :type r7rs-procedure :synopsis "(textual-port? obj)\n(binary-port? obj)" :description "Returns |#t| if |obj| is an textual port or binary port respectively,\notherwise returns #f." :similar (textual-port?))

(textual-port? :see binary-port?)
(port? :type r7rs-procedure :synopsis "(port? obj)" :description "Returns |#t| if |obj| is an input port or an output port,\notherwise returns #f." :similar ())

(interactive-port? :type extended :synopsis "(interactive-port? port)" :description "Returns |#t| if |port| is connected to a terminal and |#f| otherwise." :similar ())

(current-output-port :type procedure :synopsis "(current-input-port obj)\n(current-output-port obj)" :description "Returns the current default input or output port." :similar (current-input-port))

(current-input-port :see current-output-port)
(current-error-port :type extended :synopsis "(current-error-port obj)" :description "Returns the current default error port." :similar ())

(read :type procedure :synopsis "(read)\n(read port)" :description "|Read| converts external representations of Scheme objects into the\nobjects themselves. |Read| returns the next object parsable from the given\ninput port, updating port to point to the first character past the end of\nthe external representation of the object.\n@l\nIf an end of file is encountered in the input before any characters are found\nthat can begin an object, then an end of file object is returned. The port\nremains open, and further attempts to read will also return an end of file\nobject. If an end of file is encountered after the beginning of an object's\nexternal representation, but the external representation is incomplete\nand therefore not parsable, an error is signalled.\n@l\nThe port argument may be omitted, in which case it defaults to the value\nreturned by |current-input-port|. It is an error to read from a closed port.\n@l\n,(stklos) |read| supports the ,(link-srfi 10) |#,()| form that can be used\nto denote values that do not have a convenient printed representation. See\nthe SRFI document for more information." :similar ())

(read-with-shared-structure :type extended :synopsis "(read-with-shared-structure)\n(read-with-shared-structure  port)\n(read/ss)\n(read/ss port)" :description "|read-with-shared-structure| is identical to |read|. It has been added to\nbe compatible with ,(link-srfi 38). STklos always knew how to deal with\nrecursive input data. |read/ss| is only a shorter name for\n|read-with-shared-structure|.\n" :similar ())

(define-reader-ctor :type extended :synopsis "(define-reader-ctor tag proc)" :description "This procedure permits to define a new user to reader constructor procedure\nat run-time. It is defined in ,(link-srfi 10) document. See  SRFI document\nfor more information.\n@lisp\n(define-reader-ctor 'rev (lambda (x y) (cons y x)))\n(with-input-from-string \"#,(rev 1 2)\" read)\n                             => (2 . 1)\n@end lisp" :similar ())

(read-char :type procedure :synopsis "(read-char)\n(read-char port)" :description "Returns the next character available from the input |port|, updating the |port|\nto point to the following character. If no more characters are available,\nan end of file object is returned. |Port| may be omitted, in which case\nit defaults to the value returned by |current-input-port|." :similar ())

(read-bytes :type extended :synopsis "(read-bytes size)\n(read-bytes size port)" :description "Returns a newly allocated string made of |size| characters read from |port|.\nIf less than |size| characters are available on the input port, the returned\nstring is smaller than |size| and its size is the number of available\ncharacters. |Port| may be omitted, in which case it defaults to the\nvalue returned by |current-input-port|.\n@l\n,(bold \"Note:\") This function was previously called |read-chars|. Usage\nof the old name is deprecated." :similar (read-chars))

(read-chars :see read-bytes)
(read-bytes! :type extended :synopsis "(read-bytes! str)\n(read-bytes! str port)" :description "This function reads the characters available from |port| in the string |str|\nby chuncks whose size is equal to the length of |str|.\nThe value returned by |read-bytes!|is an integer indicating the number\nof characters read. |Port| may be omitted, in which case it defaults to the\nvalue returned by |current-input-port|.\n@l\nThis function is similar to |read-bytes| except that it avoids to allocate\na new string for each read.\n@lisp\n(define (copy-file from to)\n  (let* ((size 1024)\n         (in  (open-input-file from))\n         (out (open-output-file to))\n         (s   (make-string size)))\n    (let Loop ()\n      (let ((n (read-bytes! s in)))\n        (cond\n          ((= n size)\n             (write-chars s out)\n             (Loop))\n          (else\n             (write-chars (substring s 0 n) out)\n             (close-port out)))))))\n@end lisp\n\n,(bold \"Note:\") This function was previously called |read-chars!|. Usage\nof the old name is deprecated." :similar (read-chars!))

(read-chars! :see read-bytes!)
(read-bytevector :type r7rs-procedure :synopsis "(read-bytevector k)\n(read-bytevector k port)" :description "Reads the next |k| bytes, or as many as are available\nbefore the end of file, from the textual input |port| into a\nnewly allocated string in left-to-right order and returns the\nstring. If no characters are available before the end of file,\nan end-of-file object is returned." :similar ())

(read-byte :type extended :synopsis "(read-byte)\n(read-byte port)" :description "Returns the next character available from the input |port| as an integer.\nIf the end of file is reached, this function returns the end of file\nobject." :similar ())

(peek-char :type procedure :synopsis "(peek-char)\n(peek-char port)" :description "Returns the next character available from the input |port|, without updating\nthe port to point to the following character. If no more characters are\navailable, an end of file object is returned. |Port| may be omitted, in\nwhich case it defaults to the value returned by |current-input-port|.\n@l\n,(bold \"Note:\") The value returned by a call to |peek-char| is the same as the\nvalue that would have been returned by a call to |read-char| with the same\nport. The only difference is that the very next call to |read-char| or\n|peek-char| on that port will return the value returned by the preceding\ncall to |peek-char|. In particular, a call to |peek-char| on an interactive\nport will hang waiting for input whenever a call to |read-char| would have\nhung." :similar ())

(peek-byte :type extended :synopsis "(peek-byte)\n(peek-byte port)" :description "Returns the next character available from the input |port|, without updating\nthe port to point to the following character. Whereas |peek-char|\nreturns a character, this function returns an integer between 0and 255." :similar ())

(eof-object? :type procedure :synopsis "(eof-object? obj)" :description "Returns |#t| if |obj| is an end of file object, otherwise returns |#f|." :similar ())

(eof-object :type extended :synopsis "(eof-object)" :description ",(index \"#eof\")\nReturns an end of file object. Note that the special notation |#eof| is\nanother way to return such an end of file object." :similar ())

(char-ready? :type procedure :synopsis "(char-ready?)\n(char-ready? port)" :description "Returns |#t| if a character is ready on the input port and returns |#f|\notherwise. If char-ready returns |#t| then the next read-char operation on\nthe given port is guaranteed not to hang. If the port is at end of file\nthen |char-ready?| returns |#t|. Port may be omitted, in which case it\ndefaults to the value returned by |current-input-port|." :similar ())

(u8-ready? :type r7rs-procedure :synopsis "(u8-ready?)\n(u8-ready? port)" :description "Returns #t if a byte is ready on the binary input |port| and\nreturns #f otherwise. If |u8-ready?| returns #t then the\nnext read-u8 operation on the given port is guaranteed\nnot to hang. If the |port| is at end of file then |u8-ready?|\nreturns #t." :similar ())

(write :type procedure :synopsis "(write obj)\n(write obj port)" :description "Writes a written representation of |obj| to the given |port|. Strings that\nappear in the written representation are enclosed in doublequotes, and\nwithin those strings backslash and doublequote characters are escaped\nby backslashes. Character objects are written using the ,(emph \"#\\\\\") notation.\n|Write| returns an unspecified value. The |port| argument may be omitted, in\nwhich case it defaults to the value returned by |current-output-port|." :similar ())

(write* :type r7rs-procedure :synopsis "(write-shared obj)\n(write-shared obj port)" :description "Writes a written representation of |obj| to the given port.  The\nmain difference with the |write| procedure is that |write*|\nhandles data structures with cycles. Circular structure written by\nthis procedure use the ,(code (q \"#n=\")) and ,(code (q \"#n#\"))\nnotations (see ,(ref :mark \"Circular structure\")).\n@l\n,(bold \"Note:\") This function is also called |write*|.\nThe name |write*| was the name used by ,(stklos) for\n|write-shared| before it was introduced in ,(rseven).\n" :similar (write-shared))

(write-shared :see write*)
(write-with-shared-structure :type extended :synopsis "(write-with-shared-structure obj)\n(write-with-shared-structure obj port)\n(write-with-shared-structure obj port optarg)\n(write/ss obj)\n(write/ss obj port)\n(write/ss obj port optarg)" :description "|write-with-shared-structure| has been added to be compatible with\n,(link-srfi 38). It is is identical to |write*|, except that it accepts one\nmore parameter (|optarg|). This parameter, which is not specified\nin ,(srfi 38), is always ignored. |write/ss| is only a shorter name for\n|write-with-shared-structure|.\n" :similar ())

(display :type procedure :synopsis "(display obj)\n(display obj port)" :description "Writes a representation of |obj| to the given |port|. Strings that\nappear in the written representation are not enclosed in\ndoublequotes, and no characters are escaped within those\nstrings. Character objects appear in the representation as if\nwritten by |write-char| instead of by |write|. |Display| returns an\nunspecified value. The |port| argument may be omitted, in which\ncase it defaults to the value returned by |current-output-port|.\n@l\n,(bold \"Rationale:\") |Write| is intended for producing machine-readable\noutput and |display| is for producing human-readable output.\n@l\n,(bold \"Note:\") As required by ,(rseven) does not loop forever when\n|obj| contains self-references." :similar ())

(display-simple :type extended :synopsis "(display-simple obj)\n(display-simple obj port)" :description "The |display-simple| procedure is the same as |display|, except\nthat shared structure is never represented using datum labels.\nThis can cause |display-simple| not to terminate if |obj|\ncontains circular structure." :similar ())

(display-shared :type extended :synopsis "(display-shared obj)\n(display-shared obj port)" :description "The |display-shared| procedure is the same as |display|, except\nthat shared structure are represented using datum labels." :similar ())

(newline :type procedure :synopsis "(newline)\n(newline port)" :description "Writes an end of line to |port|. Exactly how this is done differs from\none operating system to another. Returns an unspecified value. The |port|\nargument may be omitted, in which case it defaults to the value returned\nby |current-output-port|." :similar ())

(write-char :type procedure :synopsis "(write-char char)\n(write-char char port)" :description "Writes the character |char| (not an external representation of the\ncharacter) to the given |port| and returns an unspecified value.\nThe |port| argument may be omitted, in which case it defaults to the\nvalue returned by |current-output-port|." :similar ())

(write-chars :type extended :synopsis "(write-chars str)\n(write-chars str port)" :description "Writes the characters of string |str| to the given |port| and\nreturns an unspecified value.  The |port| argument may be omitted,\nin which case it defaults to the value returned by\n|current-output-port|.\n@l\n,(bold \"Note:\") This function is generally\nfaster than |display| for strings. Furthermore, this primitive does\nnot use the buffer associated to |port|.\n" :similar ())

(write-byte :type extended :synopsis "(write-byte b)\n(write-byte b port)" :description "Write byte |b| to the port. |b| must be an exact integer in range between 0\nand 255." :similar ())

(format :type extended :synopsis "(format port str obj ...)\n(format str obj)" :description "Writes the |obj|s to the given |port|, according to the format\nstring |str|. |Str| is written literally, except for the following\nsequences:\n\n,(itemize\n(item [|~a| or |~A| is replaced by the printed representation\nof the next |obj|.])\n\n(item [|~s| or |~S| is replaced by the ``slashified'' printed\nrepresentation of the next |obj|.])\n\n(item [|~w| or |~W| is replaced by the printed representation\nof the next |obj| (circular structures are correctly handled and\nprinted using |write*|).])\n\n(item [|~d| or |~D| is replaced by the decimal printed representation\nof the next |obj| (which must be a number).])\n\n(item [|~x| or |~X| is replaced by the hexadecimal printed representation\nof the next |obj| (which must be a number).])\n\n(item [|~o| or |~O| is replaced by the octal printed representation\nof the next |obj| (which must be a number).])\n\n(item [|~b| or |~B| is replaced by the binary printed representation\nof the next |obj| (which must be a number).])\n\n(item [|~c| or |~C| is replaced by the printed representation\nof the next |obj| (which must be a character).])\n\n(item [|~y| or |~Y| is replaced by the pretty-printed representation\nof the next |obj|. The standard pretty-printer is used here.])\n\n(item [|~?| is replaced by the result of the recursive call of |format|\nwith the two next |obj|: the first item should be a string, and the\nsecond, a list with the arguments.])\n\n(item [|~k| or |~K| is another name for |~?|])\n\n(item [|~\\[w\\[,d\\]\\]f| or |~\\[w\\[,d\\]\\]F| is replaced by the printed\nrepresentation of next |obj| (which must be a number) with width |w|\nand |d| digits after the decimal. Eventually, |d| may be omitted.])\n\n(item [|~~| is replaced by a single tilde character.])\n\n(item [|~%| is replaced by a newline])\n\n(item [|~t| or |~t| is replaced by a tabulation character.])\n\n(item [|~&| is replaced by a newline character if it is known that the\nprevious character was not a newline])\n\n(item [|~_| is replaced by a space])\n\n(item [|~h| or |~H| provides some help])\n\n)\n\n|Port| can be a boolean or a port. If |port| is |#t|, output goes to\nthe current output port; if |port| is |#f|, the output is returned as a\nstring.  Otherwise, the output is printed on the specified port.\n@lisp\n   (format #f \"A test.\")        => \"A test.\"\n   (format #f \"A ~a.\" \"test\")   => \"A test.\"\n   (format #f \"A ~s.\" \"test\")   => \"A \\\\\"test\\\\\".\"\n   (format \"~8,2F\" 1/3)         => \"    0.33\"\n   (format \"~6F\" 32)            => \"    32\"\n   (format \"~1,2F\" 4321)        => \"4321.00\"\n   (format \"~1,2F\" (sqrt -3.9)) => \"0.00+1.97i\"\n   (format \"#d~d #x~x #o~o #b~b~%\" 32 32 32 32)\n                                => \"#d32 #x20 #o40 #b100000\\\\n\"\n   (format #f \"~&1~&~&2~&~&~&3~%\")\n                                => \"1\\\\n2\\\\n3\\\\n\"\n   (format \"~a ~? ~a\" 'a \"~s\" '(new) 'test)\n                                => \"a new test\"\n@end lisp\n\n,(bold \"Note:\") The second form of |format| is compliant with\n,(link-srfi 28). That is, when\n|port| is omitted, the output is returned as a string as if |port| was\ngiven the value |#f|.\n@l\n,(bold \"Note:\") Since version 0.58, |format| is also compliant with\n,(link-srfi 48)." :similar ())

(error :type extended :synopsis "(error str obj ...)\n(error name str obj ...)" :description "|error| is used to signal an error to the user. The second form\nof |error| takes  a symbol as first parameter; it is generally used for the\nname of the procedure which raises the error.\n@l\n,(bold \"Note:\") The specification string may follow the\n,(emph \"tilde conventions\")\nof |format| (see ,(ref :mark \"format\")); in this case this procedure builds an\nerror message according to the specification given in |str|. Otherwise,\nthis procedure is conform to the |error| procedure defined in\n,(link-srfi 23) and  |str| is printed with the |display| procedure,\nwhereas the |obj|s are printed  with the |write| procedure.\n\n@l\nHereafter, are some calls of the |error| procedure using a formatted string\n@lisp\n(error \"bad integer ~A\" \"a\")\n                     @print{} bad integer a\n(error 'vector-ref \"bad integer ~S\" \"a\")\n                     @print{} vector-ref: bad integer \"a\"\n(error 'foo \"~A is not between ~A and ~A\" \"bar\" 0 5)\n                     @print{} foo: bar is not between 0 and 5\n@end lisp\n\nand some conform to ,(srfi 23)\n@lisp\n(error \"bad integer\" \"a\")\n                    @print{} bad integer \"a\"\n(error 'vector-ref \"bad integer\" \"a\")\n                   @print{} vector-ref: bad integer \"a\"\n(error \"bar\" \"is not between\" 0 \"and\" 5)\n                   @print{} bar \"is not between\" 0 \"and\" 5\n@end lisp" :similar ())

(signal-error :type extended :synopsis "(signal-error cond str obj ...)\n(signal-error cond name str obj ...)" :description "This procedure is similar to error, except that the type of the error\ncan be passed as the first parameter. The type of the error must be a\ncondition which inherits from |&error-message|.\n@l\nNote that |(error arg ...)| is equivalent to\n@lisp\n(signal-error &error-message arg ...)\n@end lisp" :similar ())

(close-output-port :type procedure :synopsis "(close-input-port port)\n(close-output-port port)" :description "Closes the port associated with |port|, rendering the port incapable of\ndelivering or accepting characters. These routines have no effect if the\nport has already been closed. The value returned is ,(emph \"void\")." :similar (close-input-port))

(close-input-port :see close-output-port)
(close-port :type r7rs-procedure :synopsis "(close-port port)" :description "Closes the port associated with |port|." :similar ())

(port-closed? :type extended :synopsis "(port-closed? port)\n(port-open?  port)" :description "|port-closed?| returns |#t| if |port| is closed and |#f| otherwise.\nOn the contrary, |port-open?| returns |#t| if |port| is open and\n|#f| otherwise.\n@l\n,(bold \"Note:\") |port-closed?| was the usual STklos function to\ntest if a port is closed. |port-open?| has been added to be the companion\nof the ,(rseven) functions |input-port-open?| and |output-port-open?|" :similar (port-open?))

(port-open? :see port-closed?)
(read-line :type extended :synopsis "(read-line)\n(read-line port)" :description "Reads the next line available from the input port |port|. This function\nreturns 2 values: the first one is is the string which contains the line\nread, and the second one is the end of line delimiter. The end of line\ndelimiter can be an end of file object, a character or a string in case\nof a multiple character delimiter. If no more characters are available\non |port|, an end of file object is returned.  |Port| may be omitted,\nin which case it defaults to the value returned by |current-input-port|.\n@l\n,(bold \"Note:\") As said in ,(ref :mark \"values\"), if |read-line| is not\nused in  the context of |call-with-values|, the second value returned by\nthis procedure is ignored." :similar ())

(copy-port :type extended :synopsis "(copy-port in out)\n(copy-port in out max)" :description "Copy the content of port |in|, which must be opened for reading, on\nport |out|, which must be opened for writing. If |max| is not specified,\nAll the characters from the input port are copied on ouput port. If |max|\nis specified, it must be an integer indicating the maximum number of characters\nwhich are copied from |in| to |out|." :similar ())

(flush-output-port :type extended :synopsis "(flush-output-port)\n(flush-output-port port)" :description "Flushes the buffer associated with the given output |port|. The\n|port| argument may be omitted, in which case it defaults to the value\nreturned by |current-output-port|" :similar ())

(port-current-line :type extended :synopsis "(port-current-line)\n(port-current-line port)" :description "Returns the current line number associated to the given input |port| as an\ninteger. The |port| argument may be omitted, in which case it defaults to\nthe value returned by |current-input-port|.\n@l\n,(bold \"Note\"): The |port-seek|, |read-chars| and |read-chars!| procedures\ngenerally break the line-number. After using one of theses procedures, the\nvalue returned by |port-current-line| will be |-1| (except a |port-seek|\nat the beginning of the port reinitializes the line counter)." :similar ())

(port-current-position :type extended :synopsis "(port-current-position)\n(port-current-position port)" :description "Returns the position associated to the given |port| as an\ninteger (i.e. number of characters from the beginning of the port).\nThe |port| argument may be omitted, in which case it defaults to\nthe value returned by |current-input-port|." :similar ())

(seek-file-port :type extended :synopsis "(port-seek port pos)\n(port-seek port pos whence)" :description "Sets the file position for the given |port| to the position |pos|.\nThe new position, measured in bytes, is obtained by adding |pos|\nbytes to the position specified by |whence|. If passed, |whence|\nmust be one of |:start|, |:current| or |:end|. The resulting\nposition is relative to the start of the file, the current position\nindicator, or end-of-file, respectively. If |whence| is omitted, it\ndefaults to |:start|.\n@l\n,(bold \"Note\"): After using port-seek, the value returned by\n|port-current-line| may be incorrect." :similar ())

(port-rewind :type extended :synopsis "(port-rewind port)" :description "Sets the port position to the beginning of |port|. The value returned by\n|port-rewind| is ,(emph \"void\")." :similar ())

(port-close-hook-set! :type extended :synopsis "(port-close-hook-set! port thunk)" :description "Associate the procedure |thunk| to |port|. The thunk will be called\nthe first time |port| is closed.\n@lisp\n(let* ((tmp (temporary-file-name))\n       (p   (open-output-file tmp))\n       (foo #t))\n  (port-close-hook-set! p\n                     (lambda()\n                       (remove-file tmp)\n                       (set! foo #t)))\n  (close-port p)\n  foo)\n@end lisp" :similar ())

(port-close-hook :type extended :synopsis "(port-close-hook port)" :description "Returns the user close procedure associated to the given |port|." :similar ())


;; Source file "print.c"

(write-pretty-quotes :type extended :synopsis "(write-pretty-quotes)\n(write-pretty-quotes value)" :description "This parameter object permits to change the default behaviour of\nthe |display| or |write| primitives when they write a list which starts with\n the symbol quote,  quasiquote, unquote or unquote-splicing. If this parameter\nhas a false value, the writer uses the list notation instead of a\nmore human-readable value.\nBy default, this parameter value is set to |#t|.\n@lisp\n(let ((x ''a))\n  (display x)\n  (display \" \")\n  (write-pretty-quotes #f)\n  (display x))               @print 'a (quote a)\n@end lisp" :similar ())


;; Source file "proc.c"

(procedure? :type procedure :synopsis "(procedure? obj)" :description "Returns |#t| if |obj| is a procedure, otherwise returns |#f|.\n\n@lisp\n(procedure? car)                            =>  #t\n(procedure? 'car)                           =>  #f\n(procedure? (lambda (x) (* x x)))           =>  #t\n(procedure? '(lambda (x) (* x x)))          =>  #f\n(call-with-current-continuation procedure?) =>  #t\n@end lisp" :similar ())

(closure? :type extended :synopsis "(closure? obj)" :description "Returns |#t| if |obj| is a procedure created with the |lambda| syntax and\n|#f| otherwise." :similar ())

(map :type procedure :synopsis "(map proc list1 list2 ...)" :description "The |list|s must be lists, and |proc| must be a procedure taking as many\narguments as there are lists and returning a single value.\nIf more than one list is given, then they must all be the same length.\n|Map| applies |proc| element-wise to the elements of the |list|s and returns\na list of the results, in order.  The dynamic order in which proc is applied\nto the elements of the lists is unspecified.\n@lisp\n(map cadr '((a b) (d e) (g h)))   =>  (b e h)\n\n(map (lambda (n) (expt n n))\n     '(1 2 3 4 5))                =>  (1 4 27 256 3125)\n\n(map + '(1 2 3) '(4 5 6))         =>  (5 7 9)\n\n(let ((count 0))\n  (map (lambda (ignored)\n      (set! count (+ count 1))\n      count)\n       '(a b)))                   =>  (1 2) ,(emph \"or\") (2 1)\n@end lisp" :similar ())

(for-each :type procedure :synopsis "(for-each proc list1 list2 ...)" :description "The arguments to |for-each| are like the arguments to |map|, but |for-each|\ncalls proc for its side effects rather than for its values.\nUnlike |map|, |for-each| is guaranteed to call proc on the elements of\nthe lists in order from the first element(s) to the last, and the value\nreturned by |for-each| is ,(emph \"void\").\n@lisp\n(let ((v (make-vector 5)))\n  (for-each (lambda (i)\n              (vector-set! v i (* i i)))\n            '(0 1 2 3 4))\n  v)                                =>  #(0 1 4 9 16)\n@end lisp" :similar ())


;; Source file "process.c"

(fork :type extended :synopsis "(fork)\n(fork thunk)" :description "This procedure is a wrapper around the standard Unix |fork| system\ncall which permits to create a new (heavy) process.\nWhen called without parameter, this procedure returns two times\n(one time in the parent process and one time in the child process).\nThe value returned in the parent process is a process object\nrepresenting the child process and the value returned in the child\nprocess is always the value |#f|.\nWhen called with a parameter (which must be a thunk), the new process\nexcutes |thunk| and terminate it execution when |thunk| returns. The\nvalue returned in the parent process is a process object representing\nthe child process." :similar ())

(process? :type extended :synopsis "(process? obj)" :description "Returns |#t| if |obj| is a process , otherwise returns |#f|." :similar ())

(process-alive? :type extended :synopsis "(process-alive? proc)" :description "Returns |#t| if process |proc| is currently running, otherwise returns |#f|." :similar ())

(process-pid :type extended :synopsis "(process-pid proc)" :description "Returns an integer which represents the Unix identification (PID) of the\nprocessus." :similar ())

(process-list :type extended :synopsis "(process-list)" :description "Returns the list of processes which are currently running (i.e. alive)." :similar ())

(process-error :type extended :synopsis "(process-input proc)\n(process-output proc)\n(process-error proc)" :description "Returns the file port associated to the standard input, output or error\nof |proc|, if it is redirected in (or to) a pipe; otherwise\nreturns |#f|. Note that the returned port is opened for reading\nwhen calling |process-output| or |process-error|; it is opened\nfor writing when calling |process-input|." :similar (process-output process-input))

(process-output :see process-error)
(process-input :see process-error)
(process-wait :type extended :synopsis "(process-wait proc)" :description "Stops the current process (the Scheme process) until |proc| completion.\n|Process-wait| returns |#f| when |proc| is already terminated; it returns\n|#t| otherwise." :similar ())

(process-exit-status :type extended :synopsis "(process-exit-status proc)" :description "Returns the exit status of |proc| if it has finished its execution;\nreturns |#f| otherwise." :similar ())

(process-signal :type extended :synopsis "(process-signal proc sig)" :description "Sends the integer signal |sig| to |proc|. Since value of |sig| is system\ndependant, use the symbolic defined signal constants to make your program\nindependant of the running system (see ,(ref :mark \"signals\")).\nThe result of |process-signal| is ,(emph \"void\")." :similar ())


;; Source file "promise.c"

(force :type procedure :synopsis "(force promise)" :description "Forces the value of |promise| (see ,(ref :mark \"delay\")). If no value has been\ncomputed for the promise, then a value is computed and\nreturned. The value of the promise is cached (or \"memoized\") so\nthat if it is forced a second time, the previously computed value\nis returned.\n\n@lisp\n(force (delay (+ 1 2)))        =>  3\n(let ((p (delay (+ 1 2))))\n  (list (force p) (force p)))  =>  (3 3)\n\n(define a-stream\n  (letrec ((next (lambda (n)\n                   (cons n (delay (next (+ n 1)))))))\n    (next 0)))\n(define head car)\n(define tail (lambda (stream) (force (cdr stream))))\n\n(head (tail (tail a-stream)))  =>  2\n@end lisp\n\n|Force| and |delay| are mainly intended for programs written in\nfunctional style. The following examples should not be considered\nto illustrate good programming style, but they illustrate the\nproperty that only one value is computed for a promise, no matter\nhow many times it is forced.\n@lisp\n(define count 0)\n(define p (delay (begin (set! count (+ count 1))\n                        (if (> count x)\n                            count\n                            (force p)))))\n(define x 5)\np                     =>  a promise\n(force p)             =>  6\np                     =>  a promise, still\n(begin (set! x 10)\n       (force p))     =>  6\n@end lisp\n,(bold \"Note:\") See R5RS for details on a posssible way to implement\n|force| and |delay|." :similar ())

(promise? :type r7rs-procedure :synopsis "(promise? obj)" :description " Returns |#t| if |obj| is a promise, otherwise returns |#f|." :similar ())


;; Source file "read.c"

(read-case-sensitive :type extended :synopsis "(read-case-sensitive)\n(read-case-sensitive value)" :description "This parameter object permits to change the default behaviour of\nthe |read| primitive when reading a symbol. If this parameter has a\na true value a symbol is not converted to a default case when interned.\nSince ,(rseven) requires that symbol are case insignificant, the default\nvalue  of this parameter is |#t|.\n@lisp\n(read-case-sensitive)        => |#t|\n(read-from-string \"ABC\")     => ABC\n(read-case-sensitive #f)\n(read-from-string \"ABC\")     => abc\n@end lisp\n,(bold \"Note:\")  Default behaviour can be changed for a whole execution\nwith the |--case-sensitive| or |case-insensitive| options.\n@l\n,(bold \"Note:\") See also syntax for ,(ref :mark \"bar-in-symbol\" :text\n[special characters]) in symbols.\n" :similar ())

(keyword-colon-position :type extended :synopsis "(keyword-colon-position)\n(keyword-colon-position value)" :description "This parameter object indicates the convention used by the reader to\ndenote keywords. The allowed values are\n,(itemize\n    (item [none, to forbid a symbol with colon to be interpreted as a\n          keyword])\n    (item [before, to read symbols starting with a colon as keywords])\n    (item [after, to read symbols ending with a colon as keywords])\n    (item [both, to read symbols starting or ending with a colon as\n           keywords]))\nNote that the notation |#:key| is always read as a keyword independently\nof the value of |keyword-colon-position|. Hence, we have\n@lisp\n(list (keyword? ':a)\n      (keyword? 'a:)\n      (keyword? '#:a))\n                 => (#f #f #t)  ; if keyword-colon-position is none\n                 => (#t #f #t)  ; if keyword-colon-position is before\n                 => (#f #t #t)  ; if keyword-colon-position is after\n                 => (#t #t #t)  ; if keyword-colon-position is both\n@end lisp" :similar ())


;; Source file "regexp.c"

(string->regexp :type extended :synopsis "(string->regexp string)" :description "|String->regexp| takes a string representation of a regular\nexpression and compiles it into a regexp value. Other regular\nexpression procedures accept either a string or a regexp value as\nthe matching pattern. If a regular expression string is used\nmultiple times, it is faster to compile the string once to a regexp\nvalue and use it for repeated matches instead of using the string\neach time." :similar ())

(regexp? :type extended :synopsis "(regexp? obj)" :description "|Regexp| returns |#t| if |obj| is a regexp value created by the |regexp|,\notherwise |regexp| returns |#f|." :similar ())

(regexp-match-positions :type extended :synopsis "(regexp-match pattern str)\n(regexp-match-positions pattern str)" :description "These functions attempt to match |pattern| (a string or a regexp value)\nto |str|. If the match fails, |#f| is returned. If the match succeeds,\na list (containing strings for |regexp-match| and positions for\n|regexp-match-positions| is returned. The first string (or positions) in\nthis list is the portion of string that matched pattern. If two portions\nof string can match pattern, then the earliest and longest match is found,\nby default.\n\nAdditional strings or positions are returned in the list if pattern contains\nparenthesized sub-expressions; matches for the sub-expressions are provided\nin the order of the opening parentheses in pattern.\n@lisp\n(regexp-match-positions \"ca\" \"abracadabra\")\n                 => ((4 6))\n(regexp-match-positions \"CA\" \"abracadabra\")\n                 => #f\n(regexp-match-positions \"(?i)CA\" \"abracadabra\")\n                 => ((4 6))\n(regexp-match \"(a*)(b*)(c*)\" \"abc\")\n                 => (\"abc\" \"a\" \"b\" \"c\")\n(regexp-match-positions \"(a*)(b*)(c*)\" \"abc\")\n                 => ((0 3) (0 1) (1 2) (2 3))\n(regexp-match-positions \"(a*)(b*)(c*)\" \"c\")\n                 => ((0 1) (0 0) (0 0) (0 1))\n(regexp-match-positions \"(?<=\\\\\\\\d{3})(?<!999)foo\"\n                        \"999foo and 123foo\")\n     => ((14 17))\n@end lisp" :similar (regexp-match))

(regexp-match :see regexp-match-positions)
(regexp-quote :type extended :synopsis "(regexp-quote str)" :description "Takes an arbitrary string and returns a string where characters of\n|str| that could serve as regexp metacharacters are escaped with a\nbackslash, so that they safely match only themselves.\n@lisp\n(regexp-quote \"cons\")       => \"cons\"\n(regexp-quote \"list?\")      => \"list\\\\\\\\?\"\n@end lisp\n|regexp-quote| is useful when building a composite regexp from\na mix of regexp strings and verbatim strings." :similar ())


;; Source file "signal.c"


;; Source file "sio.c"


;; Source file "socket.c"

(make-server-socket :type extended :synopsis "(make-server-socket)\n(make-server-socket port-number)" :description "|make-server-socket| returns a new socket object. If |port-number|\nis specified, the socket is listening on the specified port;\notherwise, the communication port is chosen by the system." :similar ())

(make-client-socket :type extended :synopsis " (make-client-socket hostname port-number)\n (make-client-socket hostname port_number line-buffered)" :description "|make-client-socket| returns a new socket object. This socket\nestablishes a link between the running program and the application\nlistening on port |port-number| of |hostname|.  If  the optional argument\n|line-buffered| has a true value, a line buffered policy is used when writing\nto the client socket (i.e. characters on the socket are tranmitted as soon\nas a ,(code \"#\\\\newline\") character is encountered). The default value of\n|line-buffered| is |#t|.\n" :similar ())

(socket-shutdown :type extended :synopsis "(socket-shutdown sock)\n(socket-shutdown sock close)" :description "|Socket-shutdown| shutdowns the connection associated to\n|socket|. If the socket is a server socket, |socket-shutdown| is called\non all the client sockets connected to this server.\n|Close| indicates if the the socket must be closed or not, when\nthe connection is destroyed. Closing the socket forbids further\nconnections on the same port with the |socket-accept| procedure.\nOmitting a value for |close| implies the closing of socket.\n@l\nThe following example shows a simple server: when there is\na new connection on the port number 12345, the server displays\nthe first line sent to it by the client, discards the others and\ngo back waiting for further client connections.\n@lisp\n(let ((s (make-server-socket 12345)))\n   (let loop ()\n      (let ((ns (socket-accept s)))\n        (format #t \"I've read: ~A\\\\n\"\n                (read-line (socket-input ns)))\n        (socket-shutdown ns #f)\n        (loop))))\n@end lisp" :similar ())

(socket-accept :type extended :synopsis "(socket-accept socket)\n(socket-accept socket line-buffered)" :description "|socket-accept| waits for a client connection on the given\n|socket|. If no client is already waiting for a connection, this\nprocedure blocks its caller; otherwise, the first connection request\non the queue of pending connections is connected and |socket-accept|\nreturns a new client socket to serve this request.\nThis procedure must be called on a server socket created\nwith |make-server-socket|. The result of |socket-accept| is undefined.\n|Line-buffered| indicates if the port should be considered as a\nline buffered. If |line-buffered| is omitted, it defaults to |#t|.\n@l\nThe following example is a simple server which waits for a connection\non the port 12345 ,(footnote [Under Unix, you can simply connect to\na listening socket with the |telnet| command. With the given\nexample, this can be achieved by typing the following command in a\nwindow shell:\n,(raw-code \"$ telnet localhost 12345\")]).\n Once the connection with the\ndistant program is established, we read a line on the input port\nassociated to the socket and we write the length of this line on its\noutput port.\n@lisp\n(let* ((server (make-server-socket 12345))\n       (client (socket-accept server))\n       (l      (read-line (socket-input client))))\n  (format (socket-output client)\n          \"Length is: ~a\\n\" (string-length l))\n  (socket-shutdown server))\n@end lisp\n\n Note that shutting down the |server| socket suffices here to close\nalso the connection to |client|." :similar ())

(socket? :type extended :synopsis "(socket? obj)" :description "Returns |#t| if |socket| is a socket, otherwise returns |#f|." :similar ())

(socket-client? :type extended :synopsis "(socket-client? obj)" :description "Returns |#t| if |socket| is a client socket, otherwise returns |#f|." :similar ())

(socket-server? :type extended :synopsis "(socket-server? obj)" :description "Returns |#t| if |socket| is a server socket, otherwise returns |#f|." :similar ())

(socket-port-number :type extended :synopsis "(socket-port-number socket)" :description "Returns the integer number of the port used for |socket|." :similar ())

(socket-output :type extended :synopsis "(socket-input socket)\n(socket-output socket)" :description "Returns the port associated for reading or writing with the\nprogram connected with |socket|. Note that this port is both textual\nand binary. If no connection has already been established,\nthese functions return |#f|.\n\nThe following example shows how to make a client socket. Here we\ncreate a socket on port 13 of the machine |kaolin.unice.fr|,(footnote\n[Port 13 is generally used for testing:\nmaking a connection to it permits to know the distant system's idea\nof the time of day.]):\n@lisp\n(let ((s (make-client-socket \"kaolin.unice.fr\" 13)))\n  (format #t \"Time is: ~A~%\" (read-line (socket-input s)))\n  (socket-shutdown  s))\n@end lisp" :similar (socket-input))

(socket-input :see socket-output)
(socket-host-name :type extended :synopsis "(socket-host-name socket)" :description "Returns a string which contains the name of the distant host\nattached to |socket|. If |socket| has been created with\n|make-client-socket| this procedure returns the official name of\nthe distant machine used for connection. If |socket| has been\ncreated with |make-server-socket|, this function returns the\n official name of the client connected to the socket. If no client\nhas used yet |socket|, this function returns |#f|." :similar ())

(socket-host-address :type extended :synopsis "(socket-host-address socket)" :description "Returns a string which contains the IP number of the distant host\nattached to |socket|. If |socket| has been created with\n|make-client-socket| this procedure returns the IP number of the\ndistant machine used for connection. If |socket| has been created\nwith |make-server-socket|, this function returns the address of the\nclient connected to the socket.  If no client has used yet\n|socket|, this function returns |#f|." :similar ())

(socket-local-address :type extended :synopsis "(socket-local-address socket)" :description "Returns a string which contains the IP number of the local host\nattached to |socket|." :similar ())


;; Source file "sport.c"

(open-input-string :type extended :synopsis "(open-input-string str)" :description "Returns an input string port capable of delivering characters from\n|str|." :similar ())

(open-input-bytevector :type r7rs-procedure :synopsis "(open-input-string bytevector)" :description "Takes a bytevector and returns a binary input port that\ndelivers bytes from the |bytevector|." :similar ())

(open-output-string :type extended :synopsis "(open-output-string)" :description "Returns an output string port capable of receiving and collecting characters." :similar ())

(open-output-bytevector :type r7rs-procedure :synopsis "(open-output-bytevector)" :description "Returns a binary output port that will accumulate bytes\nfor retrieval by |get-output-bytevector|." :similar ())

(get-output-string :type extended :synopsis "(get-output-string port)" :description "Returns a string containing all the text that has been written on the\noutput string |port|.\n@lisp\n (let ((p (open-output-string)))\n    (display \"Hello, world\" p)\n    (get-output-string p))         => \"Hello, world\"\n@end lisp" :similar ())

(get-output-bytevector :type extended :synopsis "(get-output-bytevector port)" :description "Returns a bytevector consisting of the bytes that have been\noutput to the |port| so far in the order they were output.\n\n @lisp\n (let ((p (open-output-bytevector)))\n    (u8-write 65)\n    (u8-write 66)\n    (get-output-bytevector p))         => #u8(65 66)\n@end lisp" :similar ())

(output-string-port? :type extended :synopsis "(input-string-port? obj)\n(output-string-port? obj)" :description "Returns |#t| if |obj| is an input string port or output string port\nrespectively, otherwise returns #f." :similar (input-string-port?))

(input-string-port? :see output-string-port?)
(output-bytevector-port? :type extended :synopsis "(input-bytevector-port? obj)\n(output-bytevector-port? obj)" :description "Returns |#t| if |obj| is an input bytevector port or output bytevector port\nrespectively, otherwise returns #f." :similar (input-bytevector-port?))

(input-bytevector-port? :see output-bytevector-port?)

;; Source file "stklos.c"


;; Source file "str.c"

(string? :type procedure :synopsis "(string? obj)" :description "Returns |#t| if |obj| is a string, otherwise returns |#f|." :similar ())

(make-string :type procedure :synopsis "(make-string k)\n(make-string k char)" :description "|Make-string| returns a newly allocated string of length |k|. If |char| is\ngiven, then all elements of the string are initialized to |char|, otherwise\nthe contents of the string are unspecified." :similar ())

(string :type procedure :synopsis "(string char ...)" :description "Returns a newly allocated string composed of the arguments." :similar ())

(string-length :type procedure :synopsis "(string-length string)" :description "Returns the number of characters in the given |string|." :similar ())

(string-ref :type procedure :synopsis "(string-ref string k)" :description "|String-ref| returns character k of string using zero-origin indexing\n(|k| must be a valid index of string)." :similar ())

(string-set! :type procedure :synopsis "(string-set! string k char)" :description "|String-set!| stores |char| in element |k| of |string| and returns\n,(emph \"void\") (|k| must be a valid index of |string|).\n\n@lisp\n(define (f) (make-string 3 #\\*))\n(define (g) \"***\")\n(string-set! (f) 0 #\\?)  =>  void\n(string-set! (g) 0 #\\?)  =>  error\n(string-set! (symbol->string 'immutable) 0 #\\?)\n                         =>  error\n@end lisp" :similar ())

(string-ci=? :type r57rs-procedure :synopsis "(string=? string1 string2 ...)\n(string-ci=? string1 string2 ...)" :description "Returns |#t| if all the strings are the same length and contain the same\ncharacters in the same positions, otherwise returns |#f|. |String-ci=?|\ntreats upper and lower case letters as though they were the same character,\nbut |string=?| treats upper and lower case as distinct characters.\n@l\n,(bold \"Note\"): R5RS version of these functions accept only two arguments." :similar (string=?))

(string=? :see string-ci=?)
(string-ci>=? :type r57rs-procedure :synopsis "(string<? string1 string2 ...)\n(string>? string1 string2 ...)\n(string<=? string1 string2 ...)\n(string>=? string1 string2 ...)\n(string-ci<? string1 string2 ...)\n(string-ci>? string1 string2 ...)\n(string-ci<=? string1 string2 ...)\n(string-ci>=? string1 string2)" :description "These procedures are the lexicographic extensions to strings of the\ncorresponding orderings on characters. For example, |string<?| is the\nlexicographic ordering on strings induced by the ordering |char<?| on\ncharacters. If two strings differ in length but are the same up to the\nlength of the shorter string, the shorter string is considered to be\nlexicographically less than the longer string.\n@l\n,(bold \"Note\"): R5RS version of these functions accept only two arguments." :similar (string-ci>? string-ci<=? string-ci<? string>=? string>? string<=? string<?))

(string-ci>? :see string-ci>=?)
(string-ci<=? :see string-ci>=?)
(string-ci<? :see string-ci>=?)
(string>=? :see string-ci>=?)
(string>? :see string-ci>=?)
(string<=? :see string-ci>=?)
(string<? :see string-ci>=?)
(substring :type procedure :synopsis "(substring string start end)" :description "|String| must be a string, and |start| and |end| must be exact integers\nsatisfying\n@lisp\n0 <= start <= end <= (string-length string).\n@end lisp\n|Substring| returns a newly allocated string formed from the characters\nof |string| beginning with index |start| (inclusive) and ending with\nindex |end| (exclusive)." :similar ())

(string-append :type procedure :synopsis "(string-append string ...)" :description "Returns a newly allocated string whose characters form the concatenation\nof the given strings." :similar ())

(string-append! :type extended :synopsis "(string-append! string ...)" :description "Extends string by appending each value (in order) to the end of string.\nA value can be a character or a string.\n\nIt is guaranteed that string-append! will return the same object that\nwas passed to it as first argument, whose size may be larger.\n\n,(linebreak)\n,(bold \"Note:\") This function is defined in SRFI-118." :similar ())

(string-replace! :type extended :synopsis "(string-replace! dst dst-start dst-end src [src-start [src-end]])" :description "Replaces the characters of the variable-size string dst (between\ndst-start and dst-end) with the characters of the string src\n(between src-start and src-end). The number of characters from src\nmay be different than the number replaced in dst, so the string may\ngrow or contract. The special case where dst-start is equal to\ndst-end corresponds to insertion; the case where src-start is equal\nto src-end corresponds to deletion. The order in which characters\nare copied is unspecified, except that if the source and\ndestination overlap, copying takes place as if the source is first\ncopied into a temporary string and then into the destination.\nReturns string, appended with the characters form the concatenation\nof the given arguments, which can be wither strings or characters.\n\nIt is guaranteed that string-replace! will return the same object that\nwas passed to it as first argument, whose size may be larger.\n,(linebreak)\n,(bold \"Note:\") This function is defined in SRFI-118." :similar ())

(list->string :type r57rs-procedure :synopsis "(string->list string)\n(string->list string start)\n(string->list string start end)\n(list->string list)" :description "|String->list| returns a newly allocated list of the characters of\n|string| between |start| and |end|. |List->string| returns a newly\nallocated string formed from the characters in the list |list|,\nwhich must be a list of characters. |String->list| and\n|list->string| are inverses so far as |equal?| is concerned.\n\n@l\n,(bold \"Note\"): The R5RS version of |string->list| accepts only one\nparameter." :similar (string->list))

(string->list :see list->string)
(string-copy :type r57rs-procedure :synopsis "(string-copy string)\n(string-copy string start)\n(string-copy string start stop)" :description "Returns a newly allocated copy of the part of the given |string|\nbetween |start| and |stop|.\n@l\n,(bold \"Note\"): The R5RS version of |string-copy| accepts only one argument." :similar ())

(string-fill! :type r7rs-procedure :synopsis "(string-fill! string char)\n(string-fill! string char start)\n(string-fill! string char start end)" :description "Stores |char| in every element of the given |string| between |start| and |end|.\n@l\n,(bold \"Note\"): The R5RS version of |string-fill!| accepts only one argument." :similar ())

(string-find? :type extended :synopsis "(string-find? str1 str2)" :description "Returns |#t| if |str1| appears somewhere in |str2|; otherwise returns |#f|." :similar ())

(string-position :type extended :synopsis "(string-position str1 str2)" :description "Returns the (first) index where |str1| is a substring of |str2| if it exists;\notherwise returns |#f|.\n@lisp\n(string-position \"ca\" \"abracadabra\") =>  4\n(string-position \"ba\" \"abracadabra\") =>  #f\n@end lisp\n\n,(bold \"Note\") This function was also called |string-index|. This name is deprecated\nsince it conficts with the |string-index| defined in SRFI-13." :similar (string-index))

(string-index :see string-position)
(string-split :type extended :synopsis "(string-split str)\n(string-split str delimiters)" :description "parses |string| and returns a list of tokens ended by a character of the\n|delimiters| string. If |delimiters| is omitted, it defaults to a string\ncontaining a space, a tabulation and a newline characters.\n@lisp\n(string-split \"/usr/local/bin\" \"/\")\n                       => (\"usr\" \"local\" \"bin\")\n(string-split \"once   upon a time\")\n                       => (\"once\" \"upon\" \"a\" \"time\")\n@end lisp" :similar ())

(string-mutable? :type extended :synopsis "(string-mutable? obj)" :description "Returns |#t| if |obj| is a mutable string, otherwise returns |#f|.\n@lisp\n(string-mutable? \"abc\")                => #f\n(string-mutable? (string-copy \"abc\"))  => #t\n(string-mutable? (string #\\a #\\b #\\c)) => #t\n(string-mutable? 12)                   => #f\n@end lisp" :similar ())

(string-downcase :type r7rs-procedure :synopsis "(string-downcase str)\n(string-downcase str start)\n(string-downcase str start end)" :description "Returns a string in which the upper case letters of string |str| between the\n|start| and |end| indices have been replaced by their lower case equivalent.\nIf |start| is omited, it defaults to 0. If |end| is omited, it defaults to\nthe length of |str|.\n@lisp\n(string-downcase \"Foo BAR\")        => \"foo bar\"\n(string-downcase \"Foo BAR\" 4)      => \"bar\"\n(string-downcase \"Foo BAR\" 4 6)    => \"ba\"\n@end lisp\n\n,(bold \"Note\"): In R7RS, |string-downcase| accepts only one argument." :similar ())

(string-downcase! :type extended :synopsis "(string-downcase! str)\n(string-downcase! str start)\n(string-downcase! str start end)" :description "This is the in-place side-effecting variant of |string-downcase|.\n@lisp\n(string-downcase! (string-copy \"Foo BAR\") 4)    => \"Foo bar\"\n(string-downcase! (string-copy \"Foo BAR\") 4 6)  => \"Foo baR\"\n@end lisp" :similar ())

(string-upcase :type r7rs-procedure :synopsis "(string-upcase str)\n(string-upcase str start)\n(string-upcase str start end)" :description "Returns a string in which the lower case letters of string |str| between the\n|start| and |end| indices have been replaced by their upper case equivalent.\nIf |start| is omited, it defaults to 0. If |end| is omited, it defaults to\nthe length of |str|.\n@l\n,(bold \"Note\"): In R7RS, |string-upcase| accepts only one argument." :similar ())

(string-upcase! :type extended :synopsis "(string-upcase! str)\n(string-upcase! str start)\n(string-upcase! str start end)" :description "This is the in-place side-effecting variant of |string-upcase|." :similar ())

(string-foldcase :type r7rs-procedure :synopsis "(string-foldcase str)\n(string-foldcase str start)\n(string-foldcase str start end)" :description "Returns a string in which the Unicode simple case-folding algorithm has\nbeen applied on |str| between the |start| and |end| indices.\nIf |start| is omited, it defaults to 0. If |end| is omited, it defaults to\nthe length of |str|.\n@l\n,(bold \"Note\"): In R7RS, |string-foldcase| accepts only one argument." :similar ())

(string-foldcase! :type extended :synopsis "(string-foldcase! str)\n(string-foldcase! str start)\n(string-foldcase! str start end)" :description "This is the in-place side-effecting variant of |string-foldcase|." :similar ())

(string-titlecase :type extended :synopsis "(string-titlecase str)\n(string-titlecase str start)\n(string-titlecase str start end)" :description "This function returns a string.  For every character |c| in the\nselected range of |str|, if |c| is preceded by a cased character, it\nis downcased; otherwise it is titlecased. If |start| is omited, it\ndefaults to 0. If |end| is omited, it defaults to the length of |str|.\nNote that if a |start| index is specified, then the character preceding\n|s[start]| has no effect on the titlecase decision for character |s[start]|.\n@lisp\n(string-titlecase \"--capitalize tHIS sentence.\")\n         =>  \"--Capitalize This Sentence.\"\n(string-titlecase \"see Spot run. see Nix run.\")\n         =>  \"See Spot Run. See Nix Run.\"\n(string-titlecase \"3com makes routers.\")\n         =>  \"3Com Makes Routers.\"\n(string-titlecase \"greasy fried chicken\" 2)\n         => \"Easy Fried Chicken\"\n@end lisp" :similar ())

(string-titlecase! :type extended :synopsis "(string-titlecase! str)\n(string-titlecase! str start)\n(string-titlecase! str start end)" :description "This is the in-place side-effecting variant of |string-titlecase|." :similar ())

(string-blit! :type extended :synopsis "(string-blit! s1 s2 offset)" :description "This function places the characters of string |s2| in the string |s1|\nstarting at position |offset|. The result of |string-blit!| may modify\nthe string |s1|. Note that the characters of |s2| can be written after\nthe end of |s1| (in which case a new string is allocated).\n@lisp\n(string-blit! (make-string 6 #\\X) \"abc\" 2)\n              => \"XXabcX\"\n(string-blit! (make-string 10 #\\X) \"abc\" 5)\n              => \"XXXXXabcXX\"\n(string-blit! (make-string 6 #\\X) \"a\" 10)\n              => \"XXXXXX\\0\\0\\0\\0a\"\n@end lisp" :similar ())


;; Source file "struct.c"

(make-struct-type :type extended :synopsis "(make-struct-type name parent slots)" :description "This form which is more general than |define-struct| permits to define a\nnew structure type whose name is |name|. Parent is the structure\ntype from which is the new structure type is a subtype (or |#f| is the\nnew structure-type has no super type). |Slots| is the list of the slot\nnames which constitute the structure tpe.\n@l\nWhen a structure type is s subtype of a previous type, its slots are added\nto the ones of the super type." :similar ())

(struct-type? :type extended :synopsis "(struct-type? obj)" :description "Returns |#t| if |obj| is a structure type, otherwise returns |#f|.\n@lisp\n(let ((type (make-struct-type 'point #f '(x y))))\n  (struct-type? type))         => #t\n@end lisp" :similar ())

(struct-type-slots :type extended :synopsis "(struct-type-slots structype)" :description "Returns the slots of the structure type |structype| as a list.\n@lisp\n(define point  (make-struct-type 'point #f '(x y)))\n(define circle (make-struct-type 'circle point '(r)))\n(struct-type-slots point)   => (x y)\n(struct-type-slots circle)  => (x y r)\n@end lisp" :similar ())

(struct-type-parent :type extended :synopsis "(struct-type-parent structype)" :description "Returns the super type of the structure type |structype|, if it exists\nor |#f| otherwise." :similar ())

(struct-type-name :type extended :synopsis "(struct-type-name structype)" :description "Returns the name associated to the structure type |structype|." :similar ())

(struct-type-change-writer! :type extended :synopsis "(struct-type-change-writer! structype proc)" :description "Change the default writer associated to structures of type |structype| to\nto the |proc| procedure. The |proc| procedure must accept 2 arguments\n(the structure to write and the port wher the structure must be written\nin that order). The value returned by |struct-type-change-writer!| is the\nold writer associated to |structype|. To restore the standard wtructure\nwriter for |structype|, use the special value |#f|.\n\n@lisp\n(define point (make-struct-type 'point #f '(x y)))\n\n(struct-type-change-writer!\n  point\n  (lambda (s port)\n    (let ((type (struct-type s)))\n      (format port \"{~A\" (struct-type-name type))\n      ;; display the slots and their value\n      (for-each (lambda (x)\n       (format port \" ~A=~S\" x (struct-ref s x)))\n     (struct-type-slots type))\n      (format port \"}\"))))\n(display (make-struct point 1 2)) @print{} {point x=1 y=2}\n@end lisp" :similar ())

(make-struct :type extended :synopsis "(make-struct structype expr ...)" :description "Returns a newly allocated instance of the structure type |structype|,\nwhose slots are initialized to |expr| ... If fewer |expr| than the number of\ninstances are given to |make-struct|, the remaining slots are inialized with\nthe special ,(emph \"void\") value." :similar ())

(struct? :type extended :synopsis "(struct? obj)" :description "Returns |#t| if |obj| is a structure, otherwise returns |#f|.\n@lisp\n(let* ((type (make-struct-type 'point #f '(x y)))\n       (inst (make-struct type 1 2)))\n  (struct? inst))         => #t\n@end lisp" :similar ())

(struct-type :type extended :synopsis "(struct-type s)" :description "Returns the structure type of the |s| structure" :similar ())

(struct-ref :type extended :synopsis "(struct-ref s slot-name)" :description "Returns the value associated to slot |slot-name| of the |s| structure.\n@lisp\n(define point  (make-struct-type 'point #f '(x y)))\n(define circle (make-struct-type 'circle point '(r)))\n(define p (make-struct point 1 2))\n(define c (make-struct circle 10 20 30))\n(struct-ref p 'y) => 2\n(struct-ref c 'r) => 30\n@end lisp" :similar ())

(struct-set! :type extended :synopsis "(struct-set! s slot-name value)" :description "Stores value in the to slot |slot-name| of the |s| structure. The value\nreturned by |struct-set!| is ,(emph \"void\").\n\n@lisp\n(define point  (make-struct-type 'point #f '(x y)))\n(define p (make-struct point 1 2))\n(struct-ref p 'x) => 1\n(struct-set! p 'x 0)\n(struct-ref p 'x) => 0\n@end lisp" :similar ())

(struct-is-a? :type extended :synopsis "(struct-is-a? s structype)" :description "Return a boolean that indicates if the structure |s| is a of type |structype|.\nNote that if |s| is an instance of a subtype of ,(emph \"S\"), it is considered\nalso as an instance of type ,(emph \"S\").\n\n@lisp\n(define point  (make-struct-type 'point #f '(x y)))\n(define circle (make-struct-type 'circle point '(r)))\n(define p (make-struct point 1 2))\n(define c (make-struct circle 10 20 30))\n(struct-is-a? p point)   => #t\n(struct-is-a? c point)   => #t\n(struct-is-a? p circle)  => #f\n(struct-is-a? c circle)  => #t\n@end lisp" :similar ())

(struct->list :type extended :synopsis "(struct->list s)" :description "Returns the content of structure |s| as an A-list whose keys are the\nslots of the structure type of |s|.\n@lisp\n(define point  (make-struct-type 'point #f '(x y)))\n(define p (make-struct point 1 2))\n(struct->list p) => ((x . 1) (y . 2))\n@end lisp" :similar ())


;; Source file "symbol.c"

(symbol? :type procedure :synopsis "(symbol? obj)" :description "Returns |#t| if obj is a symbol, otherwise returns |#f|.\n@lisp\n   (symbol? 'foo)          =>  #t\n   (symbol? (car '(a b)))  =>  #t\n   (symbol? \"bar\")         =>  #f\n   (symbol? 'nil)          =>  #t\n   (symbol? '())           =>  #f\n   (symbol? #f)            =>  #f\n   (symbol? :key)          =>  #f\n@end lisp" :similar ())

(symbol->string :type procedure :synopsis "(symbol->string string)" :description "Returns the name of |symbol| as a string. If the symbol was part of an\nobject returned as the value of a literal expression or by a call to the\n|read| procedure, and its name contains alphabetic characters, then the\nstring returned will contain characters in the implementation's preferred\nstandard case -- STklos prefers lower case. If the symbol was returned\nby |string->symbol|, the case of characters in the string returned will be\nthe same as the case in the string that was passed to |string->symbol|. It\nis an error to apply mutation procedures like |string-set!| to strings\nreturned by this procedure.\n@lisp\n   (symbol->string 'flying-fish)  =>  \"flying-fish\"\n   (symbol->string 'Martin)       =>  \"martin\"\n   (symbol->string (string->symbol \"Malvina\"))\n                                  =>  \"Malvina\"\n@end lisp" :similar ())

(string->symbol :type procedure :synopsis "(string->symbol string)" :description "Returns the symbol whose name is |string|. This procedure can create\nsymbols with names containing special characters or letters in the\nnon-standard case, but it is usually a bad idea to create such symbols\nbecause in some implementations of Scheme they cannot be read as themselves.\n\n@lisp\n   (eq? 'mISSISSIppi 'mississippi)     =>  #t\n   (string->symbol \"mISSISSIppi\")      =>  @pipemISSISSIppi@pipe\n   (eq? 'bitBlt (string->symbol \"bitBlt\"))\n                                       =>  #f\n   (eq? 'JollyWog\n        (string->symbol\n          (symbol->string 'JollyWog))) =>  #t\n   (string=? \"K. Harper, M.D.\"\n             (symbol->string\n               (string->symbol \"K. Harper, M.D.\")))\n                                       =>  #t\n@end lisp" :similar ())

(string->uninterned-symbol :type extended :synopsis "(string->unterned-symbol string)" :description "Returns the symbol whose print name is made from the characters of\n|string|. This symbol is guaranteed to be ,(emph \"unique\") (i.e. not\n|eq?| to any other symbol):\n@lisp\n(let ((ua (string->uninterned-symbol \"a\")))\n  (list (eq? 'a ua)\n        (eqv? 'a ua)\n        (eq? ua (string->uninterned-symbol \"a\"))\n        (eqv? ua (string->uninterned-symbol \"a\"))))\n          => (#f #t #f #t)\n@end lisp" :similar ())


;; Source file "system.c"

(temp-file-prefix :type extended :synopsis "(temp-file-prefix)\n(temp-file-prefix value)" :description "This parameter object permits to change the default prefix used to build\ntemporary file name. Its default value is built using the |TMPDIR|\nenvironment variable (if it is defined) and the current process ID.\nIf a value is provided, it must be a string designating a valid prefix path.\n@l\nThis parameter object is also defined in ,(link-srfi 170)." :similar ())

(winify-file-name :type extended :synopsis "(winify-file-name fn)" :description "On Win32 system, when compiled with the Cygwin environment,\nfile names are internally represented in a POSIX-like internal form.\n|Winify-file-bame| permits to obtain back the Win32 name of an interned\nfile name\n@lisp\n(winify-file-name \"/tmp\")\n    => \"C:\\\\\\\\cygwin\\\\\\\\tmp\"\n(list (getcwd) (winify-file-name (getcwd)))\n    => (\"//saxo/homes/eg/Projects/STklos\"\n        \"\\\\\\\\\\\\\\\\saxo\\\\\\\\homes\\\\\\\\eg\\\\\\\\Projects\\\\\\\\STklos\")\n@end lisp" :similar ())

(posixify-file-name :type extended :synopsis "(posixify-file-name fn)" :description "On Win32 system, when compiled with the Cygwin environment,\nfile names are internally represented in a POSIX-like internal form.\n|posixify-file-bame| permits to obtain the interned file name from\nits external form.\nfile name\n@lisp\n(posixify-file-name \"C:\\\\\\\\cygwin\\\\\\\\tmp\")\n       => \"/tmp\"\n@end lisp" :similar ())

(expand-file-name :type extended :synopsis "(expand-file-name path)" :description "|Expand-file-name| expands the filename given in |path| to\nan absolute path.\n@lisp\n  ;; Current directory is ~eg/stklos (i.e. /users/eg/stklos)\n  (expand-file-name \"..\")            => \"/users/eg\"\n  (expand-file-name \"~eg/../eg/bin\") => \"/users/eg/bin\"\n  (expand-file-name \"~/stklos)\"      => \"/users/eg/stk\"\n@end lisp" :similar ())

(canonical-file-name :type extended :synopsis "(canonical-file-name path)" :description "Expands all symbolic links in |path| and returns its canonicalized\nabsolute path name. The resulting path does not have symbolic links.\nIf |path| doesn't designate a valid path name, |canonical-file-name|\nreturns |#f|." :similar ())

(getcwd :type extended :synopsis "(getcwd)" :description "Returns a string containing the current working directory." :similar ())

(chdir :type extended :synopsis "(chdir dir)" :description "Changes the current directory to the directory given in string |dir|." :similar ())

(create-directory :type extended :synopsis "(create-directory dir)\n(create-directory dir permissions)" :description "Create a directory with name |dir|. If |permissions| is omitted, it\ndefaults to #o775 (masked by the current umask).\n,(linebreak)\nThis function is also defined in ,(link-srfi 170). The old name\n|make-directory| is deprecated." :similar (make-directory))

(make-directory :see create-directory)
(remove-directory :type extended :synopsis "(delete-directory dir)\n(remove-directory dir)" :description "Delete the directory with name |dir|.\n@l\n,(bold \"Note:\") This function is also defined in ,(link-srfi 170). The name\n|remove-directory| is kept for compatibility." :similar (delete-directory))

(delete-directory :see remove-directory)
(getpid :type extended :synopsis "(getpid)" :description "Returns the system process number of the current program (i.e. the\nUnix ,(emph \"pid\")) as an integer." :similar ())

(system :type extended :synopsis "(system string)" :description "Sends the given |string| to the system shell |/bin/sh|. The result of\n|system| is the integer status code the shell returns." :similar ())

(file-is-executable? :type extended :synopsis "(file-is-directory?  string)\n(file-is-regular?    string)\n(file-is-readable?   string)\n(file-is-writable?   string)\n(file-is-executable? string)" :description "Returns |#t| if the predicate is true for the path name given in\n|string|; returns |#f| otherwise (or if |string| denotes a file\nwhich does not exist)." :similar (file-is-readable? file-is-writable? file-is-regular? file-is-directory?))

(file-is-readable? :see file-is-executable?)
(file-is-writable? :see file-is-executable?)
(file-is-regular? :see file-is-executable?)
(file-is-directory? :see file-is-executable?)
(file-exists? :type r7rs-procedure :synopsis "(file-exists? string)" :description "Returns |#t| if the path name given in |string| denotes an existing file;\nreturns |#f| otherwise." :similar ())

(file-size :type extended :synopsis "(file-size string)" :description "Returns the size of the file whose path name is given in\n|string|.If |string| denotes a file which does not exist,\n|file-size| returns |#f|." :similar ())

(glob :type extended :synopsis "(glob pattern ...)" :description "|Glob| performs file name ``globbing'' in a fashion similar to the\ncsh shell. |Glob| returns a list of the filenames that match at least\none of |pattern| arguments.  The |pattern| arguments may contain\nthe following special characters:\n,(itemize\n(item [|?| Matches any single character.])\n(item [|*| Matches any sequence of zero or more characters.])\n(item [|\\[chars\\]| Matches any single character in |chars|.\nIf chars contains a sequence of the form |a-b| then any character\nbetween |a| and |b| (inclusive) will match.])\n(item [|\\\\x| Matches the character |x|.])\n(item [|{a,b,...}| Matches any of the strings |a|, |b|, etc.])\n)\n\nAs with csh, a '.' at the beginning of a file's name or just after\na '/ must be matched explicitly or with a |@{@}| construct.\nIn addition, all '/' characters must be matched explicitly.\n@l\nIf the first character in a pattern is '~' then it refers to\nthe home directory of the user whose name follows the '~'.\nIf the '~' is followed immediately by `/' then the value of\nthe environment variable HOME is used.\n@l\n|Glob| differs from csh globbing in two ways.  First, it does not\nsort its result list (use the |sort| procedure if you want the list\nsorted).\nSecond, |glob| only returns the names of files that actually exist;\nin csh no check for existence is made unless a pattern contains a\n|?|, |*|, or |\\[\\]| construct." :similar ())

(remove-file :type r7rs-procedure :synopsis "(delete-file string)" :description "Removes the file whose path name is given in |string|.\nThe result of |delete-file| is ,(emph \"void\").\n@l\nThis function is also called |remove-file| for compatibility\nreasons. ,(index \"remove-file\")" :similar (delete-file))

(delete-file :see remove-file)
(rename-file :type extended :synopsis "(rename-file string1 string2)" :description "Renames the file whose path-name is |string1| to a file whose path-name is\n|string2|. The result of |rename-file| is ,(emph \"void\").\n@l\nThis function is also defined in ,(link-srfi 170)." :similar ())

(directory-files :type extended :synopsis "(directory-files path)\n(directory-files path dotfiles?)" :description "Returns the list of the files in the directory |path|. The |dotfiles?| flag\n(default |#f|) causes files beginning with ,(q \".\") to be included in the list.\nRegardless of the value of |dotfiles?|, the two files ,(q \".\") and ,(q \"..\")\nare never  returned.\n@l\nThis function is also defined in ,(link-srfi 170)." :similar ())

(copy-file :type extended :synopsis "(copy-file string1 string2)" :description "Copies the file whose path-name is |string1| to a file whose path-name is\n|string2|. If the file |string2| already exists, its content prior\nthe call to |copy-file| is lost. The result of |copy-file| is ,(emph \"void\")." :similar ())

(create-temp-file :type extended :synopsis "(create-temp-file)\n(create-temp-file prefix)" :description "Creates a new temporary file and returns two values: its name and an opened\nfile port on it. The optional argument specifies the filename prefix\nto use, and defaults to the result of invoking |temp-file-prefix|.\nThe returned file port is opened in read/write mode. It ensures that\nthe name cannot be reused by another process before being used\nin the program that calls |create-temp-file|.\nNote, that if the opened port is not used, it can be closed and collected\nby the GC.\n@lisp\n(let-values (((name port) (create-temp-file)))\n  (let ((msg (format \"Name: ~s\\n\" name)))\n    (display msg)\n    (display msg port)\n    (close-port port)))     => prints the name of the temp. file on the\n                               current output port and in the file itself.\n@end lisp\n\n,(bold \"Notes:\") This function is also defined in ,(link-srfi 170).However,\nin SRFI-170, |create-temp-file| returns only the name of the temporary file.\n@l\n|temporary-file-name| is another name for this function." :similar (temporary-file-name))

(temporary-file-name :see create-temp-file)
(create-temp-directory :type extended :synopsis "(create-temp-directory)\n(create-temp-directory prefix)" :description "Creates a new temporary directory and returns its name as a string.\nThe optional argument specifies the filename prefix to use, and\ndefaults to the result of invoking |temp-file-prefix|." :similar ())

(register-exit-function! :type extended :synopsis "(register-exit-function! proc)" :description "This function registers |proc| as an exit function. This function will\nbe called when the program exits. When called, |proc| will be passed one\nparmater which is the status given to the |exit| function (or 0 if the\nprograme terminates normally). The result of  |register-exit-function!|\nis undefined.\n@lisp\n(let* ((tmp (temporary-file-name))\n       (out (open-output-file tmp)))\n  (register-exit-function! (lambda (n)\n                             (when (zero? n)\n                               (delete-file tmp))))\n  out)\n@end lisp" :similar ())

(exit :type extended :synopsis "(exit)\n(exit ret-code)" :description "Exits the program with the specified integer return code. If |ret-code|\nis omitted, the program terminates with a return code of 0.\nIf  program has registered exit functions with |register-exit-function!|,\nthey are called (in an order which is the reverse of their call order).\n@l\n,(bold \"Note:\") The ,(stklos) |exit| primitive accepts also an\ninteger value as parameter (,(rseven) accepts only a boolean)." :similar ())

(emergency-exit :type extended :synopsis "(emergency-exit)\n(emergency-exit ret-code)" :description "Terminates the program without running any outstanding\ndynamic-wind ,(emph \"after\") procedures and communicates an exit\nvalue to the operating system in the same manner as |exit|.\n@l\n,(bold \"Note:\") The ,(stklos) |emergency-exit| primitive accepts also an\ninteger value as parameter (,(rseven) accepts only a boolean)." :similar ())

(machine-type :type extended :synopsis "(machine-type)" :description "Returns a string identifying the kind of machine which is running the\nprogram. The result string is of the form\n|[os-name]-[os-version]-[cpu-architecture]|." :similar ())

(date :type extended :synopsis "(date)" :description "Returns the current date in a string." :similar ())

(clock :type extended :synopsis "(clock)" :description "Returns an approximation of processor time, in milliseconds, used so far by the\nprogram." :similar ())

(current-seconds :type extended :synopsis "(current-seconds)" :description "Returns the time since the Epoch (that is 00:00:00 UTC, January 1, 1970),\nmeasured in seconds.\n@l\n@bold(\"Note\"): This ,(stklos) function should not be confused with\nthe ,(rseven)  primitive |current-second| which returns an inexact number\nand whose result is expressed using  the International Atomic Time\ninstead of UTC.\n" :similar ())

(current-second :type r7rs-procedure :synopsis "(current-second)" :description "Returns an inexact number representing the current time on the\nInternational Atomic Time (TAI) scale.  The value 0.0 represents\nmidnight on January 1, 1970 TAI (equivalent to ten seconds before\nmidnight Universal Time) and the value 1.0 represents one TAI\nsecond later." :similar ())

(current-time :type extended :synopsis "(current-time)" :description "Returns a time object corresponding to the current time." :similar ())

(sleep :type extended :synopsis "(sleep n)" :description "Suspend the execution of the program for at |ms| milliseconds. Note that due\nto system clock resolution, the pause may be a little bit longer. If a\nsignal arrives during the pause, the execution may be resumed.\n" :similar ())

(seconds->date :type extended :synopsis "(seconds->date n)" :description "Convert the date |n| expressed as a number of seconds since the Epoch\nto a date." :similar ())

(date->seconds :type extended :synopsis "(date->seconds d)" :description "Convert the date |d| to the number of seconds since the ,(emph \"Epoch\")." :similar ())

(running-os :type extended :synopsis "(running-os)" :description "Returns the name of the underlying Operating System which is running\nthe program.\nThe value returned by |runnin-os| is a symbol. For now, this procedure\nreturns either |unix|, |android|, |windows|, or |cygwin-windows|." :similar ())

(getenv :type extended :synopsis "(getenv str)\n(getenv)" :description "Looks for the environment variable named |str| and returns its\nvalue as a string, if it exists. Otherwise, |getenv| returns |#f|.\nIf |getenv| is called without parameter, it returns the list of\nall the environment variables accessible from the program as an\nA-list.\n@lisp\n(getenv \"SHELL\")\n     => \"/bin/zsh\"\n(getenv)\n     => ((\"TERM\" . \"xterm\") (\"PATH\" . \"/bin:/usr/bin\") ...)\n@end lisp" :similar ())

(setenv! :type extended :synopsis "(setenv! var value)" :description "Sets the environment variable |var| to |value|. |Var| and\n|value| must be strings. The result of |setenv!| is ,(emph \"void\")." :similar ())

(unsetenv! :type extended :synopsis "(unsetenv! var)" :description "Unsets the environment variable |var|. |Var| must be a string.\nThe result of |unsetenv!| is ,(emph \"void\")." :similar ())

(hostname :type extended :synopsis "(hostname)" :description "Return the  host name of the current processor as a string." :similar ())

(pause :type extended :synopsis "(pause)" :description "" :similar ())


;; Source file "utf8.c"


;; Source file "uvector.c"

(bytevector-copy :type r7rs-procedure :synopsis "(bytevector-copy bytevector)\n(bytevector-copy bytevector start)\n(bytevector-copy bytevector start end)" :description "Returns a newly allocated bytevector containing the bytes in |bytevector|\nbetween |start| and |end|.\n@lisp\n(define a #u8(1 2 3 4 5))\n(bytevector-copy a 2 4))       =>  #u8(3 4)\n@end lisp" :similar ())

(bytevector-append :type procedure :synopsis "(bytevector-append bytevector ...)" :description "Returns a newly allocated bytevector whose elements are\nthe concatenation of the elements in the given bytevectors.\n@lisp\n(bytevector-append #u8(0 1 2) #u8(3 4 5))\n                    =>  #u8(0 1 2 3 4 5)\n@end lisp" :similar ())

(string->utf8 :type r7rs-procedure :synopsis "(utf8->string bytevector)\n(utf8->string bytevector start)\n(utf8->string bytevector start end)\n(string->utf8 string)\n(string->utf8 string start)\n(string->utf8 string start end)" :description "These procedures translate between strings and bytevectors\nthat encode those strings using the UTF-8 encoding.\nThe |utf8->string| procedure decodes the bytes of\na bytevector between |start| and |end| and returns the\ncorresponding string; the |string->utf8| procedure encodes the\ncharacters of a string between |start| and |end| and returns\nthe corresponding bytevector.\n\nIt is an error for |bytevector| to contain invalid UTF-8 byte\nsequences.\n@lisp\n(utf8->string #u8(#x41))   => \"A\"\n(string->utf8 \"λ\")         => #u8((#xce #xbb)\n@end lisp" :similar (utf8->string))

(utf8->string :see string->utf8)

;; Source file "vector.c"

(vector? :type procedure :synopsis "(vector? obj)" :description "Returns |#t| if |obj| is a vector, otherwise returns |#f|." :similar ())

(make-vector :type procedure :synopsis "(make-vector k)\n(make-vector k fill)" :description "Returns a newly allocated vector of |k| elements. If a second argument is\ngiven, then each element is initialized to |fill|. Otherwise the initial\ncontents of each element is unspecified." :similar ())

(vector :type procedure :synopsis "(vector obj ...)" :description "Returns a newly allocated vector whose elements contain the given arguments.\nAnalogous to |list|.\n\n@lisp\n(vector 'a 'b 'c)               =>  #(a b c)\n@end lisp" :similar ())

(vector-length :type procedure :synopsis "(vector-length vector)" :description "Returns the number of elements in |vector| as an exact integer." :similar ())

(vector-ref :type procedure :synopsis "(vector-ref vector k)" :description "|k| must be a valid index of |vector|. |Vector-ref| returns the contents of\nelement |k| of vector.\n@lisp\n(vector-ref '#(1 1 2 3 5 8 13 21)\n            5)         =>  8\n(vector-ref '#(1 1 2 3 5 8 13 21)\n            (let ((i (round (* 2 (acos -1)))))\n              (if (inexact? i)\n                  (inexact->exact i)\n                  i))) => 13\n@end lisp" :similar ())

(vector-set! :type procedure :synopsis "(vector-set! vector k obj)" :description "|k| must be a valid index of |vector|. |Vector-set!| stores |obj| in element\n|k| of |vector|. The value returned by |vector-set!| is ,(emph \"void\").\n\n@lisp\n(let ((vec (vector 0 '(2 2 2 2) \"Anna\")))\n  (vector-set! vec 1 '(\"Sue\" \"Sue\"))\n  vec)      =>  #(0 (\"Sue\" \"Sue\") \"Anna\")\n\n(vector-set! '#(0 1 2) 1 \"doe\")  =>  error  ; constant vector\n@end lisp" :similar ())

(list->vector :type r57rs-procedure :synopsis "(vector->list vector)\n(vector->list vector start)\n(vector->list vector start end)\n(list->vector list)" :description "|Vector->list| returns a newly allocated list of the objects contained in\nthe elements of |vector| between start an end. |List->vector| returns a\nnewly created vector initialized to the elements of the list |list|.\n\nIn both procedures, order is preserved.\n\n@lisp\n(vector->list '#(dah dah didah))     =>  (dah dah didah)\n(vector->list '#(dah dah didah) 1 2) =>  (dah)\n(list->vector '(dididit dah))        =>  #(dididit dah)\n@end lisp\n\n,(bold \"Note\"): The R5RS version of |vector->list| accepts only one\nparameter." :similar (vector->list))

(vector->list :see list->vector)
(vector-copy :type r57rs-procedure :synopsis "(vector-copy v)\n(vector-copy v start)\n(vector-copy v start stop)" :description "Return a newly allocated copy of the elements of the given\nvector between |start| and |end| . The elements of the new\nvector are the same (in the sense of eqv?) as the elements\nof the old.\n\nNote that, if |v| is a constant vector, its copy is not constant.\n\n@lisp\n(define a #(1 8 2 8))         ; a is immutable\n(define b (vector-copy a))    ; b is mutable\n(vector-set! b 0 3)\nb                            => #(3 8 2 8)\n(define c (vector-copy b 1 3))\nc                            => #(8 2)\n@end lisp" :similar ())

(vector-append :type procedure :synopsis "(vector-append vector ...)" :description "Returns a newly allocated vector whose elements are the\nconcatenation of the elements of the given vectors.\n\n@lisp\n(vector-append #(a b c) #(d e f)) => #(a b c d e f)\n@end lisp" :similar ())

(vector-fill! :type r57rs-procedure :synopsis "(vector-fill! vector fill)\n(vector-fill! vector fill start)\n(vector-fill! vector fill start end)" :description "Stores |fill| in every element of |vector| between |start| and |end|.\n@l\n,(bold \"Note\"): The R5RS version of |vector-fill!| accepts only one\nparameter." :similar ())

(vector-resize :type extended :synopsis "(vector-resize v size)\n(vector-resize v size fill)" :description "Returns a copy of v of the given |size|. If |size| is greater\nthan the vector size of |v|, the contents of the newly allocated vector cells\nis  set to the value of |fill|. If |fill| is omitted the content of the\nnew cells is ,(emph \"void\")." :similar ())

(vector-mutable? :type extended :synopsis "(vector-mutable? obj)" :description "Returns |#t| if |obj| is a mutable vector, otherwise returns |#f|.\n@lisp\n(vector-mutable? '#(1 2 a b))            => #f\n(vector-mutable? (vector-copy '#(1 2)))  => #t\n(vector-mutable? (vector 1 2 3))         => #t\n(vector-mutable? 12)                     => #f\n@end lisp" :similar ())

(sort :type extended :synopsis "(sort obj predicate)" :description "|Obj| must be a list or a vector. |Sort| returns a copy of |obj| sorted\naccording to |predicate|. |Predicate| must be a procedure which takes\ntwo arguments and returns a true value if the first argument is strictly\n``before'' the second.\n\n@lisp\n(sort '(1 2 -4 12 9 -1 2 3) <)\n               => (-4 -1 1 2 2 3 9 12)\n(sort '#(\"one\" \"two\" \"three\" \"four\")\n      (lambda (x y) (> (string-length x) (string-length y))))\n               => '#(\"three\" \"four\" \"one\" \"two\")\n@end lisp" :similar ())


;; Source file "vm.c"

(apply :type procedure :synopsis "(apply proc arg1 ... args)" :description "|Proc| must be a procedure and |args| must be a list. Calls |proc| with the\nelements of the list\n@lisp\n(append (list arg1 ...) args)\n@end lisp\nas the actual arguments.\n@lisp\n(apply + (list 3 4))              =>  7\n\n(define compose\n  (lambda (f g)\n     (lambda args\n       (f (apply g args)))))\n\n((compose sqrt *) 12 75)          =>  30\n@end lisp" :similar ())

(values :type procedure :synopsis "(values obj ...)" :description "Delivers all of its arguments to its continuation.\n,(bold \"Note:\") R5RS imposes to use multiple values in the context of\nof a |call-with-values|. In STklos, if |values| is not used with\n|call-with-values|, only the first value is used (i.e. others values are\n,(emph \"ignored\")).\n" :similar ())

(current-exception-handler :type extended :synopsis "(current-exception-handler)" :description "Returns the current exception handler. This procedure is defined in\n,(link-srfi 18)." :similar ())


;; Source file "vport.c"

(open-input-virtual :type extended :synopsis "(open-input-virtual :key  (read-char #f) (ready? #f) (eof? #f) (close #f))" :description "Returns a virtual port using the |read-char| procedure to read a\ncharacter from the port, |ready?| to know if there is any data to\nread from the port, |eof?| to know if the end of file is reached\non the port and finally |close| to close the port. All theses\nprocedure takes one parameter which is the port from which the input\ntakes place.  |Open-input-virtual| accepts also the special value\n|#f| for the I/O procedures with the following conventions:\n,(itemize\n   (item [if |read-char| or |eof?| is |#f|, any attempt to read\nthe virtual port will return an eof object;])\n   (item [if |ready?| is |#f|, the file is always  ready\nfor reading;])\n   (item [if |close| is |#f|, no action is done when the port is\nclosed.]))\n@l\nHereafter is a possible implementation of |open-input-string|\nusing virtual ports:\n@lisp\n(define (open-input-string str)\n  (let ((index 0))\n    (open-input-virtual\n       :read-char (lambda (p)\n                 ;; test on eof is already done by the system\n                 (let ((res (string-ref str index)))\n                   (set! index (+ index 1))\n                   res))\n       :eof? (lambda (p) (>= index (string-length str))))))\n@end lisp" :similar ())

(open-output-virtual :type extended :synopsis "(open-output-virtual :key  (write-char #f) (write-string #f) (flush #f) (close #f))" :description "Returns a virtual port using the |write-char| procedure to write a\ncharacter to the port, |write-string| to write a string to the port,\n|flush| to (eventuelly) flush the characters on the port and finally\n|close|to close the port. |Write-char| takes two parameters: a character and\nthe port to which the output must be done. |write-string| takes two\nparameters: a string and a port. |Flush| and |Close| take one\nparameter which is the port on which the action must be done.\n|Open-output-virtual| accepts also the special value |#f|\nfor the I/O procedures. If a procedure is |#f| nothing is done\non the corresponding action.\n@l\nHereafter is an (very inefficient) implementation of a variant of\n|open-output-string| using virtual ports. The value of the output\nstring is printed when the port is closed:\n@lisp\n(define (open-output-string)\n  (let ((str \"\"))\n    (open-output-virtual\n       :write-char (lambda (c p)\n                  (set! str (string-append str (string c))))\n       :write-string (lambda (s p)\n                    (set! str (string-append str s)))\n       :close (lambda (p) (write str) (newline)))))\n@end lisp\n,(bold \"Note:\") |write-string| is mainly used for writing strings and is\ngenerally more efficient than writing the string character by character.\nHowever, if |write-string| is not provided, strings are printed with\n|write-char|.  On the other hand, if |write-char| is absent,\ncharacters are written by successive allocation of one character strings.\n@l\nHereafter is another example: a virtual file port where all characters\nare converted to upper case:\n@lisp\n(define (open-output-uppercase-file file)\n  (let ((out (open-file file \"w\")))\n    (and out\n         (open-output-virtual\n             :write-string (lambda (s p)\n                             (display (string-upper s) out))\n             :close (lambda (p)\n                      (close-port out))))))\n@end lisp" :similar ())

(output-virtual-port? :type extended :synopsis "(input-virtual-port? obj)\n(output-virtual-port? obj)" :description "Returns |#t| if |obj| is a virtual input port or a virtual output port\nrespectively, otherwise returns #f." :similar (input-virtual-port?))

(input-virtual-port? :see output-virtual-port?)

;; Source file "thread-common.c"

(current-thread :type extended :synopsis "(current-thread)" :description " Returns the current thread.\n@lisp\n(eq? (current-thread) (current-thread))  =>  #t\n@end lisp" :similar ())

(thread? :type extended :synopsis "(thread? obj)" :description "Returns |#t| if |obj| is a thread, otherwise returns |#f|.\n@lisp\n(thread? (current-thread))  => #t\n(thread? 'foo)              => #f\n@end lisp" :similar ())

(thread-name :type extended :synopsis "(thread-name thread)" :description "Returns the name of the |thread|.\n@lisp\n(thread-name (make-thread (lambda () #f) 'foo))  =>  foo\n@end lisp" :similar ())

(thread-stack-size :type extended :synopsis "(thread-stack-size thread)" :description "Returns the allocated stack size for |thread|.\nNote that this procedure is not present in ,(quick-link-srfi 18)." :similar ())

(thread-specific :type extended :synopsis "(thread-specific thread)" :description "Returns the content of the |thread|'s specific field." :similar ())

(thread-specific-set! :type extended :synopsis "(thread-specific-set! thread)" :description "Stores |obj| into the |thread|'s specific field. |Thread-specific-set!|\nreturns an unspecified value.\n@lisp\n(thread-specific-set! (current-thread) \"hello\")\n           =>  unspecified\n(thread-specific (current-thread))\n           =>  \"hello\"\n@end lisp" :similar ())

(thread-start! :type extended :synopsis "(thread-start! thread)" :description "Makes |thread| runnable. The |thread| must be a new thread.\n|Thread-start!| returns the thread.\n@lisp\n(let ((t (thread-start! (make-thread\n                           (lambda () (write 'a))))))\n   (write 'b)\n   (thread-join! t))       =>  unspecified\n                               after writing ab or ba\n@end lisp" :similar ())


;; Source file "thread-pthreads.c"

(thread-yield! :type extended :synopsis "(thread-yield!)" :description "The current thread exits the running state as if its quantum had\nexpired. |Thread-yield!| returns an unspecified value." :similar ())

(thread-terminate! :type extended :synopsis "(thread-terminate! thread)" :description "Causes an abnormal termination of the |thread|. If the |thread| is not\nalready terminated, all mutexes owned by the |thread| become\nunlocked/abandoned and a \"terminated thread exception\" object is stored\nin the thread's end-exception field. If |thread| is the current thread,\n|thread-terminate!| does not return. Otherwise, |thread-terminate!|\nreturns an unspecified value; the termination of the thread will occur\nbefore |thread-terminate!| returns.\n@l\n,(bold \"Note: \")\nThis operation must be used carefully because it terminates a thread\nabruptly and it is impossible for that thread to perform any kind of\ncleanup. This may be a problem if the thread is in the middle of a\ncritical section where some structure has been put in an inconsistent\nstate. However, another thread attempting to enter this critical section\nwill raise an \"abandoned mutex exception\" because the mutex is\nunlocked/abandoned.\n,(linebreak)\nOn ,(emph \"Android\"), |thread-terminate!| can be used only to terminate the\ncurrent thread.  Trying to kill another thread produces an error." :similar ())

(thread-join! :type extended :synopsis "(thread-join! thread)\n(thread-join! thread timeout)\n(thread-join! thread timeout timeout-val)" :description "The current thread waits until the |thread| terminates (normally or not)\nor until the timeout is reached if |timeout| is supplied.\nIf the timeout is reached, |thread-join!| returns |timeout-val| if it is\nsupplied, otherwise a \"join timeout exception\" is raised.\nIf the |thread| terminated normally, the content of the end-result\nfield is returned, otherwise the content of the end-exception field\nis raised.\n@lisp\n(let ((t (thread-start! (make-thread (lambda ()\n                                       (expt 2 100))))))\n  (thread-sleep! 1)\n  (thread-join! t)) => 1267650600228229401496703205376\n@end lisp" :similar ())

(thread-sleep! :type extended :synopsis "(thread-sleep! timeout)" :description "The current thread waits until the |timeout| is reached. This blocks the\nthread only if timeout represents a point in the future. It is an error\nfor timeout to be |#f|. |Thread-sleep!| returns an unspecified value." :similar ())


;; Source file "mutex-common.c"

(make-mutex :type extended :synopsis "(make-mutex)\n(make-mutex name)" :description " Returns a new mutex in the unlocked/not-abandoned state. The optional |name|\nis an arbitrary Scheme object which identifies the mutex\n(useful for debugging); it defaults to an unspecified value.\nThe mutex's specific field is set to an unspecified value." :similar ())

(mutex? :type extended :synopsis "(mutex? obj)" :description "Returns |#t| if obj is a mutex, otherwise returns |#f|." :similar ())

(mutex-name :type extended :synopsis "(mutex-name mutex)" :description "Returns the name of the |mutex|.\n@lisp\n(mutex-name (make-mutex 'foo))  =>  foo\n@end lisp" :similar ())

(mutex-specific :type extended :synopsis "(mutex-specific mutex)" :description "Returns the content of the |mutex|'s specific field." :similar ())

(mutex-specific-set! :type extended :synopsis "(mutex-specific! mutex obj)" :description "Stores |obj| into the |mutex|'s specific field and eturns an unspecified value.\n@lisp\n(define m (make-mutex))\n(mutex-specific-set! m \"hello\")  =>  unspecified\n(mutex-specific m)               =>  \"hello\"\n\n(define (mutex-lock-recursively! mutex)\n  (if (eq? (mutex-state mutex) (current-thread))\n      (let ((n (mutex-specific mutex)))\n        (mutex-specific-set! mutex (+ n 1)))\n      (begin\n        (mutex-lock! mutex)\n        (mutex-specific-set! mutex 0))))\n\n(define (mutex-unlock-recursively! mutex)\n  (let ((n (mutex-specific mutex)))\n    (if (= n 0)\n        (mutex-unlock! mutex)\n        (mutex-specific-set! mutex (- n 1)))))\n@end lisp" :similar ())

(make-condition-variable :type extended :synopsis "(make-conditon-variable)\n(make-conditon-variable name)" :description "Returns a new empty condition variable. The optional |name| is an arbitrary\nScheme object which identifies the condition variable (useful for debugging);\nit defaults to an unspecified value. The condition variable's specific\nfield is set to an unspecified value." :similar ())

(condition-variable? :type extended :synopsis "(conditon-variable? obj)" :description "Returns |#t| if |obj| is a condition variable, otherwise returns |#f|." :similar ())

(condition-variable-name :type extended :synopsis "(conditon-variable-name conditon-variable)" :description "eturns the name of the |condition-variable|." :similar ())

(condition-variable-specific :type extended :synopsis "(conditon-variable-specific conditon-variable)" :description "Returns the content of the |condition-variable|'s specific field." :similar ())

(condition-variable-specific-set! :type extended :synopsis "(conditon-variable-specific-set! conditon-variable obj)" :description "Stores |obj| into the |condition-variable|'s specific field." :similar ())


;; Source file "mutex-pthreads.c"

(mutex-state :type extended :synopsis "(mutex-state mutex)" :description "Returns information about the state of the |mutex|. The possible results\nare:\n,(itemize\n (item [,(bold \"thread T\"): the mutex is in the locked/owned state and\n    thread T is the owner of the mutex])\n (item [,(bold \"symbol not-owned\"): the mutex is in the locked/not-owned\n    state])\n (item [,(bold \"symbol abandoned\"): the mutex is in the unlocked/abandoned\n     state])\n (item [,(bold \"symbol not-abandoned\"): the mutex is in the\n     unlocked/not-abandoned state]))\n@lisp\n(mutex-state (make-mutex))  =>  not-abandoned\n\n(define (thread-alive? thread)\n  (let ((mutex (make-mutex)))\n    (mutex-lock! mutex #f thread)\n    (let ((state (mutex-state mutex)))\n      (mutex-unlock! mutex) ; avoid space leak\n      (eq? state thread))))\n@end lisp" :similar ())

(mutex-lock! :type extended :synopsis "(mutex-lock! mutex)\n(mutex-lock! mutex timeout)\n(mutex-lock! mutex timeout thread)" :description "If the |mutex| is currently locked, the current thread waits until the\n|mutex| is unlocked, or until the timeout is reached if |timeout| is supplied.\nIf the |timeout| is reached, |mutex-lock!| returns |#f|.\nOtherwise, the state of the mutex is changed as follows:\n,(itemize\n (item [if thread is |#f| the mutex becomes locked/not-owned,])\n (item [otherwise, let T be thread (or the current thread if thread\n        is not supplied),\n        ,(itemize\n          (item [if T is terminated the mutex becomes unlocked/abandoned,])\n          (item [otherwise mutex becomes locked/owned with T as the owner.]))]))\n@l\nAfter changing the state of the mutex, an \"abandoned mutex exception\" is\nraised if the mutex was unlocked/abandoned before the state change,\notherwise |mutex-lock!| returns |#t|.\n@lisp\n(define (sleep! timeout)\n  ;; an alternate implementation of thread-sleep!\n  (let ((m (make-mutex)))\n  (mutex-lock! m #f #f)\n  (mutex-lock! m timeout #f)))\n@end lisp" :similar ())

(mutex-unlock! :type extended :synopsis "(mutex-unlock! mutex)\n(mutex-unlock! mutex condition-variable)\n(mutex-unlock! mutex condition-variable timeout)" :description "Unlocks the |mutex| by making it unlocked/not-abandoned. It is not an error\nto unlock an unlocked mutex and a mutex that is owned by any thread.\nIf |condition-variable| is supplied, the current thread is blocked and\nadded to the |condition-variable| before unlocking |mutex|; the thread\ncan unblock at any time but no later than when an appropriate call to\n|condition-variable-signal!| or |condition-variable-broadcast!| is\nperformed (see below), and no later than the timeout (if timeout is\nsupplied). If there are threads waiting to lock this mutex, the scheduler\nselects a thread, the |mutex| becomes locked/owned or locked/not-owned,\nand the thread is unblocked. |mutex-unlock!| returns |#f| when the\n|timeout| is reached, otherwise it returns |#t|." :similar ())

(condition-variable-signal! :type extended :synopsis "(condition-variable-signal! condition-variable)" :description "If there are threads blocked on the |condition-variable|, the scheduler\nselects a thread and unblocks it. |Condition-variable-signal!|  returns\nan unspecified value." :similar ())

(condition-variable-broadcast! :type extended :synopsis "(condition-variable-broadcast! condition-variable)" :description "Unblocks all the threads blocked on the |condition-variable|.\n|Condition-variable-broadcast!| returns an unspecified value." :similar ())

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:40 2023


;; Source file "assembler.stk"

(disassemble :type extended :synopsis "(disassemble proc)\n(disassemble proc port)" :description "This function prints on the given port (by default the current output\nport) the instructions of procedure |proc|. The printed code uses an\n,(emph \"ad-hoc\") instruction set that should be quite understandable.\n\n@lisp\n(define (fact n)\n  (if (< n 2)\n      1\n      (* n (fact (- n 1)))))\n@end lisp\n\nThe call ,(code \"(disassemble fact)\") will produce the following output:\n\n@lisp\n   000:  LOCAL-REF0-PUSH\n   001:  SMALL-INT            2\n   003:  JUMP-NUMGE           2  ;; ==> 007\n   005:  IM-ONE\n   006:  RETURN\n   007:  LOCAL-REF0-PUSH\n   008:  PREPARE-CALL\n   009:  LOCAL-REF0\n   010:  IN-SINT-ADD2         -1\n   012:  PUSH-GREF-INVOKE     0 1\n   015:  IN-MUL2\n   016:  RETURN\n@end lisp\n,(bold \"Notes:\")\n,(itemize\n   (item [The code of a procedure may be patched after the first execution\n          of |proc| to optimize it;])\n   (item [If |proc| is an anonymous function, you can use the special\n         notation '#pxxx' to disassemble it:]))\n@lisp\n(disassemble #p7fee1dd82f80)  ;; (address-of (lambda() 42))\n\n      000:  SMALL-INT            42\n      002:  RETURN\n@end lisp" :similar ())

(disassemble-expr :type extended :synopsis "(disassemble-expr sexpr)\n(disassemble-expr sexpr show-consts)\n(disassemble-expr sexpr show-consts port)" :description "This function prints on the given |port| (by default the current output\nport) the instructions of the given |sexpr|. If |show-consts| is true,\nthe table of the contants used in |sexpr| is also printed.\n\n@lisp\n(disassemble-expr '(begin\n                      (define x (+ y 10))\n                      (cons x y))\n                    #t)\n@end lisp\n\nwill print:\n\n@lisp\n000:  GLOBAL-REF           0\n002:  IN-SINT-ADD2         10\n004:  DEFINE-SYMBOL        1\n006:  GLOBAL-REF-PUSH      1\n008:  GLOBAL-REF           0\n010:  IN-CONS\n011:\n\nConstants:\n0: y\n1: x\n@end lisp" :similar ())


;; Source file "bb.stk"


;; Source file "bonus.stk"

(gensym :type extended :synopsis "(gensym)\n(gensym prefix)" :description "Creates a new symbol. The print name of the generated symbol\nconsists of a prefix (which defaults to ,(q [G|])) followed by the decimal\nrepresentation of a number. If |prefix| is specified, it must be\neither a string or a symbol.\n@lisp\n(gensym)        => @pipeG100@pipe\n(gensym \"foo-\") => foo-101\n(gensym 'foo-)  => foo-102\n@end lisp" :similar ())

(remove! :type extended :synopsis "(remove pred list)" :description "|Remove| returns |list| without the elements that satisfy predicate |pred|:\n@l\nThe list is not disordered -- elements that appear in the result list occur\nin the same order as they occur in the argument list. |Remove!| does the\nsame job than |remove| by physically modifying its |list| argument\n@lisp\n(remove even? '(0 7 8 8 43 -4)) => (7 43)\n@end lisp" :similar (remove))

(remove :see remove!)
(delete! :type extended :synopsis "(delete  x list [=])\n(delete! x list [=])" :description "|Delete| uses the comparison procedure |=|, which defaults to\n|equal?|, to find all elements of |list| that are equal to |x|, and\ndeletes them from |list|. The dynamic order in which the various\napplications of |=| are made is not specified.\n@l\nThe list is not disordered -- elements that appear in the result\nlist occur in the same order as they occur in the argument list.\n@l\nThe comparison procedure is used in this way: |(= x ei)|. That is,\n|x| is always the first argument, and a list element is always the\nsecond argument. The comparison procedure will be used to compare\neach element of list exactly once; the order in which it is applied\nto the various |ei| is not specified. Thus, one can reliably remove\nall the numbers greater than five from a list with\n@lisp\n(delete 5 list <)\n@end lisp\n\n|delete!| is the linear-update variant of |delete|. It is allowed,\nbut not required, to alter the cons cells in its argument |list| to\nconstruct the result." :similar (delete))

(delete :see delete!)
(every :type extended :synopsis "(every pred list1 list2 ...)" :description "|every| applies the predicate |pred| across the lists, returning true if\nthe predicate returns true on every application.\n@l\nIf there are n list arguments |list1| ... |listn|, then |pred| must be\na procedure taking n arguments and returning a boolean result.\n@l\n|every| applies pred to the first elements of the |listi| parameters. If\nthis application returns false, every immediately returns |%f|.\nOtherwise, it iterates, applying |pred| to the second elements of the |listi|\nparameters, then the third, and so forth. The iteration stops when a\nfalse value is produced or one of the lists runs out of values.\nIn the latter case, |every| returns the true value produced by its final\napplication of pred. The application of pred to the last element of the\nlists is a tail call.\n@l\nIf one of the |listi| has no elements, |every| simply returns |%t|.\n@l\nLike |any|, every's name does not end with a question mark -- this is to\nindicate that it does not return a simple boolean (|%t| or |%f|), but a\ngeneral value." :similar ())

(any :type extended :synopsis "(any pred list1 list2 ...)" :description "|any| applies the predicate across the lists, returning true if the\npredicate returns true on any application.\n@l\nIf there are n list arguments |list1| ... |listn|, then |pred| must be\na procedure taking n arguments.\n@l\n|any| applies |pred| to the first elements of the |listi| parameters. If\nthis application returns a true value, |any| immediately returns that value.\nOtherwise, it iterates, applying |pred| to the second elements of the |listi|\nparameters, then the third, and so forth. The iteration stops when a true\nvalue is produced or one of the lists runs out of values; in the latter case,\nany returns |%f|. The application of |pred| to the last element of the\nlists is a tail call.\n@l\nLike every, |any|'s name does not end with a question mark -- this is\nto indicate that it does not return a simple boolean (|%t| or |%f|), but\na general value.\n\n@lisp\n(any integer? '(a 3 b 2.7))   => #t\n(any integer? '(a 3.1 b 2.7)) => #f\n(any < '(3 1 4 1 5)\n       '(2 7 1 8 2))          => #t\n@end lisp" :similar ())

(call-with-input-string :type extended :synopsis "(call-with-input-string string proc)" :description "behaves as |call-with-input-file| except that the port passed to |proc|\nis the sting port obtained from |port|.\n@lisp\n(call-with-input-string \"123 456\"\n  (lambda (x)\n     (let* ((n1 (read x))\n            (n2 (read x)))\n        (cons n1 n2))))          => (123 . 456)\n@end lisp" :similar ())

(call-with-output-string :type extended :synopsis "(call-with-output-string proc)" :description "|Proc| should be a procedure of one argument. |Call-with-output-string|\ncalls |proc| with a freshly opened output string port. The result of\nthis procedure is a string containing all the text that has been written\non the string port.\n@lisp\n(call-with-output-string\n  (lambda (x) (write 123 x) (display \"Hello\" x))) => \"123Hello\"\n@end lisp" :similar ())

(read-from-string :type extended :synopsis "(read-from-string str)" :description "Performs a read from the given |str|. If |str| is the empty string,\nan end of file object is returned.\n\n@lisp\n(read-from-string \"123 456\") => 123\n(read-from-string \"\")        => an eof object\n@end lisp" :similar ())

(eval-from-string :type extended :synopsis "(eval-from-string str)\n(eval-from-string str module)" :description "Read an expression from |str| and evaluates it with |eval|. If a |module|\nis passed, the evaluation takes place in the environment of this module.\nOtherwise, the evaluation takes place in the environment returned by\n|current-module|.\n@lisp\n(define x 10)\n(define-module M\n  (define x 100))\n(eval-from-string \"(+ x x)\")                   => 20\n(eval-from-string \"(+ x x)\" (find-module 'M))  => 200\n@end lisp" :similar ())

(command-line :type r7rs-procedure :synopsis "(command-line)" :description "Returns the command line passed to the process as a list\nof strings. The first string corresponds to the command\nname." :similar ())

(program-name :type extended :synopsis "(program-name)" :description "Returns the invocation name of the current program as a string. If the file is\nnot a script (in sense of SRFI 193), it is the name of the running ,(stklos)\ninterpreter, otherwise it is the name of the running script. This function always\nreturns a string wheareas the|command-name| procedure returns #f when the\nprogram name is not a script." :similar ())

(create-directories :type extended :synopsis "(create-directories dir)\n(create-directories dir permissions)" :description "Create a directory with name |dir|. No error is signaled if |dir| already exists.\nParent directories of |dir| are created as needed. If |permissions| is omitted,\nit defaults to #o775 (masked by the current umask).\n@l\nThis function was also called |make-directories|. This old name is obsolete." :similar ())

(ensure-directories-exist :type extended :synopsis "(ensure-directories-exist path)" :description "Create a directory with name |dir| (and its parent directories if needed), if it\ndoes not exist yet." :similar ())

(posix-error? :type extended :synopsis "(posix-error? obj)" :description "This procedure returns #t if |obj| is a condition object that describes a\nPOSIX error, and #f otherwise.\n,(linebreak)\nThis function is defined in ,(link-srfi 170)." :similar ())

(posix-error-name :type extended :synopsis "(posix-error-name posix-error)" :description "This procedure returns a symbol that is the name associated with the\nvalue of |errno| when the POSIX function reported an error. This can be\nused to provide programmatic recovery when a POSIX function can return\nmore than one value of |errno|.\n,(linebreak)\nThis function is defined in ,(link-srfi 170)." :similar ())

(posix-error-message :type extended :synopsis "(posix-error-message posix-error)" :description "This procedure returns a string that is an error message reflecting the\nvalue of errno when the POSIX function reported an error. This string\nis useful for reporting the cause of the error to the user\n,(linebreak)\nThis function is defined in ,(link-srfi 170)." :similar ())

(posix-error-errno :type extended :synopsis "(posix-error-errno posix-error)" :description "This procedure returns the value of |errno| (an exact integer)." :similar ())

(posix-error-procedure :type extended :synopsis "(posix-error-procedure posix-error)" :description "This procedure returns the name of the Scheme procedure that raised\nthe error." :similar ())

(posix-error-arguments :type extended :synopsis "(posix-error-args posix-error)" :description "This procedure returns the list of the Scheme procedure arguments\nthat raised the error." :similar ())

(make-hash-table :type extended :synopsis "(make-hash-table)\n(make-hash-table comparison)\n(make-hash-table comparison hash)" :description "|Make-hash-table| admits three different forms.  The most general form\nadmit two arguments. The first argument is a comparison function which\ndetermines how keys are compared; the second argument is a function which\ncomputes a hash code for an object and returns the hash code as a non\nnegative integer. Objets with the same hash code are stored in an A-list\nregistered in the bucket corresponding to the key.\n@l\nIf omitted,\n,(itemize\n(item [|hash| defaults to the |hash-table-hash| procedure (see\n,(ref :mark \"hash-table-hash\")).])\n(item [|comparison| defaults to the |eq?| procedure (see ,(ref :mark \"eq?\")).])\n)\nConsequently,\n@lisp\n(define h (make-hash-table))\n@end lisp\nis equivalent to\n@lisp\n(define h (make-hash-table eq? hash-table-hash))\n@end lisp\n\nAn interesting example is\n@lisp\n(define h (make-hash-table string-ci=? string-length))\n@end lisp\nwhich defines a new hash table which uses |string-ci=?| for\ncomparing keys. Here, we use the string-length as a (very simple)\nhashing function. Of course, a function which gives a key depending\nof the characters composing the string gives a better repartition\nand should probably enhance performances. For instance, the following\ncall to |make-hash-table| should return a more efficient, even if\nnot perfect, hash table:\n@lisp\n(make-hash-table\n   string-ci=?\n   (lambda (s)\n     (let ((len (string-length s)))\n       (do ((h 0)  (i 0 (+ i 1)))\n           ((= i len) h)\n         (set! h\n               (+ h (char->integer\n                      (char-downcase (string-ref s i)))))))))\n@end lisp\n\n,(bold \"Note:\") Hash tables with a comparison function equal to |eq?| or\n|string=?| are handled in an more efficient way (in fact, they don't use\nthe |hash-table-hash| function to speed up hash table retrievals)." :similar ())

(hash-table->alist :type extended :synopsis "(hash-table->alist hash)" :description "Returns an ``association list'' built from the entries in |hash|.\nEach entry in |hash| will be represented as a pair whose |car| is the\nentry's key and whose |cdr| is its value.\n@l\n,(bold \"Note:\") the order of pairs in the resulting list is unspecified.\n@lisp\n(let ((h (make-hash-table)))\n  (dotimes (i 5)\n    (hash-table-set! h i (number->string i)))\n  (hash-table->alist h))\n       => ((3 . \"3\") (4 . \"4\") (0 . \"0\")\n           (1 . \"1\") (2 . \"2\"))\n@end lisp" :similar ())

(alist->hash-table :type extended :synopsis "(alist->hash-table alist)\n(alist->hash-table alist comparison)\n(alist->hash-table alist comparison hash)" :description "Returns hash-table built from the ``association list''\n|alist|. This function maps the |car| of every element in |alist|\nto the |cdr| of corresponding elements in |alist|. the |comparison| and\n|hash| functions are interpreted as in |make-hash-table|. If some key\noccurs multiple times in |alist|, the value in the first\nassociation will take precedence over later ones.\n" :similar ())

(hash-table-update! :type extended :synopsis "(hash-table-update! hash key update-fun thunk)\n(hash-table-update!/default hash key update-fun default)" :description "Update the value associated to |key| in table |hash| if key is already in\ntable with the value |(update-fun current-value)|. If no value is\nassociated to |key|, a new entry in the table is first inserted\nbefore updating it (this new entry being the result of calling |thunk|).\n@l\nNote that the expression\n@lisp\n(hash-table-update!/default hash key update-fun default)\n@end lisp\nis equivalent to\n@lisp\n(hash-table-update! hash key update-fun (lambda () default))\n@end lisp\n\n@lisp\n(let ((h   (make-hash-table))\n      (1+  (lambda (n) (+ n 1))))\n  (hash-table-update!/default h 'test 1+ 100)\n  (hash-table-update!/default h 'test 1+)\n  (hash-table-ref h 'test))             => 102\n@end lisp" :similar (hash-table-update!/default))

(hash-table-update!/default :see hash-table-update!)
(hash-table-keys :type extended :synopsis "(hash-table-keys hash)\n(hash-table-values hash)" :description "Returns the keys or the values of |hash|." :similar (hash-table-values))

(hash-table-values :see hash-table-keys)
(hash-table-fold :type extended :synopsis "(hash-table-fold hash func init-value)" :description "This procedure calls |func| for every association in |hash|\nwith three arguments: the key of the association key, the value\nof the association value, and an accumulated value, |val|. |Val| is\ninit-value for the first invocation of |func|, and for subsequent\ninvocations of |func|, the return value of the previous invocation of\n|func|. The value |final-value| returned by |hash-table-fold| is the\nreturn value of the last invocation of |func|. The order in which |func| is\ncalled for different associations is unspecified.\n@l\nFor instance, the following expression\n@lisp\n(hash-table-fold ht (lambda (k v acc) (+ acc 1)) 0)\n@end lisp\ncomputes the number of associations present in the |ht| hash table." :similar ())

(hash-table-merge! :type extended :synopsis "(hash-table-merge! hash1 hash2)" :description "Adds all mappings in |hash2| into |hash1| and returns the resulting\nhash table. This function may modify |hash1| destructively." :similar ())

(hash-table-copy :type extended :synopsis "(hash-table-copy hash)" :description "Returns a copy of |hash|." :similar ())

(fluid-let :type extended-syntax :synopsis "(fluid-let <bindings> <body>)" :description "The |<bindings>| are evaluated in the current environment, in some\nunspecified order, the current values of the variables present in\n|<bindings>| are saved, and the new evaluated values are assigned to the\n|<bindings>| variables. Once this is done, the expressions of |<body>|\nare evaluated sequentially in the current environment; the value of the\nlast expression is the result of |fluid-let|. Upon exit, the stored\nvariables values are restored. An error is signalled if any of the\n|<bindings>| variable is unbound.\n@lisp\n(let* ((a 'out)\n       (f (lambda () a)))\n  (list (f)\n        (fluid-let ((a 'in)) (f))\n        (f))) => (out in out)\n@end lisp\n\nWhen the body of a |fluid-let| is exited by invoking a continuation,\nthe new variable values are saved, and the variables are set to their old\nvalues. Then, if the body is reentered by invoking a continuation, the old\nvalues are saved and new values are restored. The following example illustrates\nthis behavior\n\n@lisp\n(let ((cont #f)\n      (l    '())\n      (a    'out))\n  (set! l (cons a l))\n  (fluid-let ((a 'in))\n    (set! cont (call-with-current-continuation (lambda (k) k)))\n    (set! l (cons a l)))\n  (set! l (cons a l))\n\n  (if cont (cont #f) l)) =>  (out in out in out)\n@end lisp" :similar ())

(setter :type procedure :synopsis "(setter proc)" :description "Returns the setter associated to a |proc|. Setters are defined in the\n,(link-srfi 17) document. A setter proc, can be used in a generalized\nassignment, as described in |set!|.\n@l\nTo associate |s| to the procedure |p|, use the following form:\n@lisp\n(set! (setter p) s)\n@end lisp\nFor instance, we can write\n@lisp\n(set! (setter car) set-car!)\n@end lisp\n\nThe following standard procedures have pre-defined setters:\n@lisp\n(set! (car x) v)              == (set-car! x v)\n(set! (cdr x) v)              == (set-cdr! x v)\n(set! (string-ref x i) v)     == (string-set! x i v)\n(set! (vector-ref x i) v)     == (vector-set! x i v)!\n(set! (slot-ref x 'name) v)   == (slot-set! x 'name v)\n(set! (struct-ref x 'name) v) == (struct-set! x 'name v)\n@end lisp\nFurhermore, ,(ref :section \"Parameter Objects\" :text \"parameters objects\")\nare their own setter:\n@lisp\n(real-precision)              => 15\n(set! (real-precision) 12)\n(real-precision)              => 12\n@end lisp" :similar ())

(time :type extended-syntax :synopsis "(time expr1 expr2 ...)" :description "Evaluates the expressions |expr1|, |expr2|, ... and returns the\nresult of the last expression. This form prints also the time spent\nfor this evaluation, in milliseconds, on the current error port.\nThis is CPU time, and not real (\"wall\") time." :similar ())

(-> :type extended-syntax :synopsis "(tagbody <expression1> <expression2> ...)\n(-> tag)" :description "The |<expression>|s are evaluated sequentially from left to right,\nand the value(s) of the last <expression> is(are) returned as in a\n|begin| form. Within a |tagbody| form expressions which are keywords\nare considered as tags and the special form |(-> tag)| is used to\ntransfer execution to the given tag. This is a ,(bold \"very low level\")\nform which is inspired on |tabgody| Common Lisp's form. It can be useful\nfor defining new syntaxes, and should probably not used as is.\n\n@lisp\n(tagbody               ;; an infinite loop\n   #:1 (display \".\")\n       (-> #:1))\n\n(let ((v 0))\n  (tagbody\n   #:top (when (< v 5)\n           (display v)\n           (set! v (fx+ v 1))\n           (-> #:top))))                      => prints 01234\n\n(tagbody (display 1)\n         (tagbody (display 2)\n                  (-> #:inner)\n                  (display \"not printed\")\n           #:inner\n                 (display 3)\n                 (-> #:outer)\n                 (display \"not printed too\"))\n   #:outer\n         (display \"4\"))                        => prints 1234\n@end lisp" :similar (tagbody))

(tagbody :see ->)
(dotimes :type extended-syntax :synopsis "(dotimes [var count] <expression1> <expression2> ...)\n(dotimes [var count result] <expression1> <expression2> ...)" :description "Evaluates the |count| expression, which must return an\ninteger and then evaluates the |<expression>|s once for each\ninteger from zero (inclusive) to |count| (exclusive), in order,\nwith the symbol |var| bound to the integer; if the value of\n|count| is zero or negative, then the |<expression>|s are not\nevaluated. When the loop completes, |result| is evaluated and its\nvalue is returned as the value of the |dotimes| construction. If\n|result| is omitted, |dotimes| result is ,(emph \"void\").\n@lisp\n(let ((l '()))\n  (dotimes (i 4 l)\n     (set! l (cons i l)))) => (3 2 1 0)\n@end lisp" :similar ())

(repeat :type extended-syntax :synopsis "(repeat count <expression1> <expression2> ...)" :description "Evaluates the |count| expression, which must return an\ninteger and then evaluates the |<expression>|s once for each\ninteger from zero (inclusive) to |count| (exclusive). The result of\n|repeat| is undefined.\n\n,(linebreak)\nThis form could be easily simulated with |dotimes|. Its interest is\nthat it is faster.\n@lisp\n(repeat 3 (display \".\"))     => prints \"...\"\n(repeat 0 (display \".\"))     => prints nothing\n@end lisp" :similar ())

(while :type extended-syntax :synopsis "(while <test> <expression1> <expression2> ...)" :description "|While| evaluates the |<expression>|s until |<test>| returns a false\nvalue. The value returned by this form is ,(emph \"void\")." :similar ())

(until :type extended-syntax :synopsis "(until <test> <expression1> <expression2> ...)" :description "|Until| evaluates the |<expression>|s until |<while>| returns a false\nvalue. The value returned by this form is ,(emph \"void\")." :similar ())

(call/ec :type extended :synopsis "(call/ec proc)" :description "|call/ec| is an short name for |call-with-escape-continuation|. |call/ec|\ncalls |proc| with one parameter, which is the current escape continuation\n(a continuation which can only be used to abort a computation and hence\ncannot be \"re-enterered\".\n\n@lisp\n(list 1\n      (call/ec (lambda (return) (list 'a (return 'b) 'c)))\n      3)        => (1 b 3)\n@end lisp\n|call/ec| is cheaper than the full call/cc. It is particularily useful\nwhen all the power of |call/cc| is not needded." :similar ())

(base64-encode-string :type extended :synopsis "(base64-encode-string str)" :description "Return a string contening the contents of |str| converted to Base64\nencoded format." :similar ())

(base64-decode-string :type extended :synopsis "(base64-encode-string str)" :description "Decode the contents of |str| expressed in Base64." :similar ())

(md5sum-file :type extended :synopsis "(md5sum-file str)" :description "Return a string contening the md5 dum of the file whose name is |str|." :similar ())

(port->string-list :type extended :synopsis "(port->string port)\n(port->sexp-list port)\n(port->string-list port)" :description "All these procedure take a port opened for reading. |Port->string| reads\n|port| until the it reads an end of file object and returns all the\ncharacters read as a string. |Port->sexp-list)| and |port->string-list|\ndo the same things except that they return a list of S-expressions and\na list of strings respectively. For the following example we suppose that\nfile |\"foo\"| is formed of two lines which contains respectively the number\n|100| and the string |\"bar\"|.\n@lisp\n(port->sexp-list (open-input-file \"foo\"))   => (100 \"bar\")\n(port->string-list (open-input-file \"foo\")) => (\"100\" \"\\\"bar\\\"\")\n@end lisp" :similar (port->sexp-list port->string))

(port->sexp-list :see port->string-list)
(port->string :see port->string-list)
(printerr :type extended :synopsis "(print obj ...)\n(printerr obj ...)" :description "These procedures display all their arguments followed by a newline. The\nprocedure |print| uses the standard output port, whereas |printerr| uses the\ncurrent error port" :similar (print))

(print :see printerr)
(eprintf :type extended :synopsis "(printf fmt obj ...)\n(fprintf port fmt obj ...)\n(eprintf fmt obj ...)" :description "These procedures are specialized version of |,(ref :mark \"format\" \"format\")|.\nIn these procedures, |fmt| is a string using the |format| conventions.\n|printf| outputs go on the current output port.\n|fprintf| outputs go on the specified |port|.\n|eprintf| outputs go on the current error port (note that eprintf always\nflushes the characters printed)." :similar (fprintf printf))

(fprintf :see eprintf)
(printf :see eprintf)
(declare-new-error :type extended-syntax :synopsis "(declare-new-error name)" :description "TODO\n" :similar ())

(exec-list :type extended :synopsis "(exec str)\n(exec-list str)" :description "These procedures execute the command given in |str|. The command given\nin |str| is passed to |/bin/sh|. |Exec| returns a string which contains\nall the characters that the command |str| has printed on it's standard\noutput, whereas |exec-list| returns a list of the lines which constitute\nthe output of |str|.\n@lisp\n(exec \"echo A; echo B\")                => \"A\\\\nB\\\\n\"\n(exec-list \"echo A; echo B\")           => (\"A\" \"B\")\n@end lisp" :similar (exec))

(exec :see exec-list)
(apropos :type extended :synopsis "(apropos obj)\n(apropos obj module)" :description "|Apropos| returns a list of symbols whose print name contains the\ncharacters of |obj| as a substring . The given |obj| can be a string or\nsymbol. This function returns the list of matched symbols which can\nbe accessed from the given |module| (defaults to the current module if not\nprovided).\n" :similar ())

(die :type extended :synopsis "(die message)\n(die message status)" :description "|Die| prints the given |message| on the current error port and exits\nthe program with the |status| value. If |status| is omitted, it\ndefaults to 1." :similar ())

(decompose-file-name :type extended :synopsis "(decompose-file-name string)" :description "Returns an ``exploded'' list of the path name components given in\n|string|.\nThe first element in the list denotes if the given |string| is an\nabsolute path or a relative one, being \"/\" or \".\" respectively.\nEach component of this list is a string.\n@lisp\n(decompose-file-name \"/a/b/c.stk\") => (\"/\" \"a\" \"b\" \"c.stk\")\n(decompose-file-name \"a/b/c.stk\")  => (\".\" \"a\" \"b\" \"c.stk\")\n@end lisp" :similar ())

(dirname :type extended :synopsis "(dirname str)" :description "Returns a string containing all but the last component of the path\nname given in |str|.\n@lisp\n(dirname \"/a/b/c.stk\") => \"/a/b\"\n@end lisp" :similar ())

(basename :type extended :synopsis "(basename str)" :description "Returns a string containing the last component of the path name\ngiven in |str|.\n@lisp\n(basename \"/a/b/c.stk\") => \"c.stk\"\n@end lisp" :similar ())

(file-separator :type extended :synopsis "(file-separator)" :description "Retuns the operating system file separator as a character. This is typically\n#\\\\/ on Unix (or Cygwin) systems and #\\\\\\\\ on Windows." :similar ())

(make-path :type extended :synopsis "(make-path dirname .  names)" :description "Builds a file name from the directory |dirname| and |names|. For instance,\non a Unix system:\n@lisp\n(make-path \"a\" \"b\" \"c\")   => \"a/b/c\"\n@end lisp" :similar ())

(file-suffix :type extended :synopsis "(file-suffix pathname)" :description "Returns the suffix of given |pathname|. If no suffix is found, |file-suffix|\nreturns #f.\n@lisp\n(file-suffix \"./foo.tar.gz\") => \"gz\"\n(file-suffix \"./a.b/c\")      => #f\n(file-suffix \"./a.b/c.\")     => \"\"\n(file-suffix \"~/.profile\")   => #f\n@end lisp" :similar ())

(file-prefix :type extended :synopsis "(file-prefix pathname)" :description "Returns the prefix of given |pathname|.\n@lisp\n(file-prefix \"./foo.tar.gz\") => \"./foo.tar\"\n(file-prefix \"./a.b/c\")      => \"./a.b/c\"\n@end lisp" :similar ())

(port-idle-reset! :type extended :synopsis "(port-idle-register! port thunk)\n(port-idle-unregister! port thunk)\n(port-idle-reset! port)" :description "|port-idle-register!| allows to register |thunk| as an idle handler\nwhen reading on port. That means that |thunk| will be called continuously\nwhile waiting  an input on |port| (and only while using a reading\nprimitive on this port). |port-idle-unregister!| can be used to\nunregister a handler previously set by |port-idle-register!|. The\nprimitive |port-idle-reset!| unregisters all the handlers set on\n|port|.\n\nHereafter is a (not too realistic) example: a message will be displayed\nrepeatedly until a ,(emph \"sexpr\") is read on the current input port.\n\n@lisp\n(let ((idle (lambda () (display \"Nothing to read!\\\\n\"))))\n  (port-idle-register! (current-input-port) idle)\n  (let ((result (read)))\n    (port-idle-unregister! (current-input-port) idle)\n    result))\n@end lisp" :similar (port-idle-unregister! port-idle-register!))

(port-idle-unregister! :see port-idle-reset!)
(port-idle-register! :see port-idle-reset!)
(chmod :type extended :synopsis "(chmod str)\n(chmod str option1 ...)" :description "Change the access mode of the file whose path name is given in |string|.\nThe options must be composed of either an integer or one of the\nfollowing symbols |read|, |write| or |execute|. Giving no option to |chmod|\nis equivalent to pass it the integer |0|. If the operation succeeds,\n|chmod| returns |%t|; otherwise it returns |%f|.\n\n@lisp\n(chmod \"~/.stklos/stklosrc\" 'read 'execute)\n(chmod \"~/.stklos/stklosrc\" #o644)\n@end lisp" :similar ())

(with-mutex :type extended :synopsis "(with-mutex mtx <body>)" :description "Executes |body|, protected by mutex |mtx|. The mutex will\nbe locked before and released after execution of |body|, and\nalso on entrance or departure of its dynamic context\n(lock and unlock are used with |dynamic-wind|)." :similar ())

(error-object-location :type extended :synopsis "(error-object-location error-object)" :description "Returns the location encapsulated by |error-object| if it exists.\nReturns #f otherwise. The location corresponds generally to the name\nof the procedure which raised the error.\n@lisp\n(guard (cnd\n         (else (error-object-location cnd)))\n  (error 'foo \"error message\"))  => foo\n@end lisp" :similar ())

(receive :type extended-syntax :synopsis "(receive <formals> <expression> <body>)" :description "This form is defined in ,(link-srfi 8). It simplifies\nthe usage of multiple values. Specifically, |<formals>| can have any\nof three forms:\n,(itemize\n(item [(|<variable1>| ... |<variablen>|):\n,(linebreak)\nThe environment in which the\nreceive-expression is evaluated is extended by binding |<variable1>|, ...,\n|<variablen>| to fresh locations.\n@l\nThe |<expression>| is evaluated, and its\nvalues are stored into those locations. (It is an error if |<expression>|\ndoes not have exactly n values.)\n])\n(item [|<variable>|:\n,(linebreak)\nThe environment in which the receive-expression is\nevaluated is extended by binding |<variable>| to a fresh location.\nThe |<expression>| is evaluated, its values are converted into a newly\nallocated list, and the list is stored in the location bound to |<variable>|.\n])\n(item [(|<variable1>| ... |<variablen>| . |<variablen + 1>|):\n,(linebreak)\nThe environment\nin which the receive-expression is evaluated is extended by binding\n|<variable1>|, ..., |<variablen + 1>| to fresh locations.\nThe |<expression>| is evaluated. Its first n values are stored into the\nlocations bound to |<variable1>| ... |<variablen>|. Any remaining values\nare converted into a newly allocated list, which is stored into the location\nbound to |<variablen + 1>|. (It is an error if |<expression>| does not have\nat least n values.)])\n)\n\nIn any case, the expressions in |<body>| are evaluated sequentially in\nthe extended environment. The results of the last expression in the body\nare the values of the receive-expression.\n@lisp\n(let ((n 123))\n  (receive (q r)\n     (values (quotient n 10) (modulo n 10))\n     (cons q r)))\n              => (12 . 3)\n@end lisp" :similar ())

(case-lambda :type extended-syntax :synopsis "(case-lambda <clause> ...)" :description "Each |<clause>| should have the form |(<formals> <body>)|, where\n|<formals>| is a formal arguments list as for |lambda|.\nEach |<body>| is a |<tail-body>|, as defined in R5RS.\n@l\nA |case-lambda| expression evaluates to a procedure that\naccepts a variable number of arguments and is lexically scoped in\nthe same manner as procedures resulting from |lambda|\nexpressions. When the procedure is called with some arguments\n|v1 ... vk|, then the first |<clause>| for which the arguments agree\nwith |<formals>| is selected, where agreement is specified as for the\n|<formals>| of a |lambda| expression. The variables of |<formals>|\nare bound to fresh locations, the values |v1 ... vk| are stored in those\nlocations, the |<body>| is evaluated in the extended environment,\nand the results of |<body>| are returned as the results of the\nprocedure call.\n@l\nIt is an error for the arguments not to agree with the |<formals>|\nof any |<clause>|.\n@l\nThis form is defined in ,(link-srfi 16).\n\n@lisp\n (define plus\n   (case-lambda\n    (() 0)\n    ((x) x)\n    ((x y) (+ x y))\n    ((x y z) (+ (+ x y) z))\n    (args (apply + args))))\n\n (plus)                     => 0\n (plus 1)                   => 1\n (plus 1 2 3)               => 6\n\n ((case-lambda\n   ((a) a)\n   ((a b) (* a b)))\n  1 2 3)                    => error\n@end lisp" :similar ())

(parameterize :type extended-syntax :synopsis "(parameterize ((expr1 expr2) ...) <body>)" :description "The expressions |expr1| and |expr2| are evaluated in an unspecified order.\nThe value of the |expr1| expressions must be parameter objects.\nFor each |expr1| expression and in an unspecified order, the local\ndynamic environment is extended with a binding of the parameter object\n|expr1| to a new cell whose content is the result of the call\n|(converter val)|, where |val| is the value of |expr2| and converter\nis the conversion procedure of the parameter object. The resulting\ndynamic environment is then used for the evaluation of |<body>|\n(which refers to the R5RS grammar nonterminal of that name).\nThe result(s) of the parameterize form are the result(s) of\nthe |<body>|.\n\n@lisp\n(radix)                                              =>  2\n(parameterize ((radix 16)) (radix))                  =>  16\n(radix)                                              =>  2\n\n(define (f n) (number->string n (radix)))\n\n(f 10)                                               =>  \"1010\"\n(parameterize ((radix 8)) (f 10))                    =>  \"12\"\n(parameterize ((radix 8) (prompt (f 10))) (prompt))  =>  \"1010\"\n@end lisp" :similar ())

(require-extension :type extended-syntax :synopsis "(require-extension <clause> ...)" :description "The syntax of require-extension is as follows:\n@lisp\n(require-extension <clause> ...)\n@end lisp\nA clause has the form:\n@lisp\n (srfi <extension-argument> ...)\n@end lisp\nwhere |<extension-argument>|s may be any Scheme-values.\n@l\nIf an |<extension-argument>| is a nonnegative integer, the functionality\nof the indicated SRFIs is made available in the context in\nwhich the require-extension form appears. For instance,\n@lisp\n(require-extension (srfi 1 2))\n               ; Make the SRFI 1 and 2 available\n@end lisp\nThis form is compatible with ,(link-srfi 55). However, STklos\naccepts also some symbolic names for requiring some extensions.\nFor instance,\n@lisp\n(require-extension (srfi lists and-let*))\n@end lisp\nis equivalent to the previous |require-extension|. A list of available\n symbols as  |<extension-argument>| is given in chapter\n,(ref :chapter \"SRFIs\")." :similar ())

(string->keyword :type extended :synopsis "(string->keyword str)" :description "This function function has been added to be compatibe with SRFI-88.\nIt is equivalent to make-keyword, except that the parameter cannot be\na symbol." :similar ())

(get-environment-variable :type r7rs-procedure :synopsis "(get-environment-variable name)" :description "Returns the value of the named environment variable as a string, or\n|%f| if the named environment variable is not found. The name argument\nis expected to be a string. This function is similar to the |getenv|. It\nhas been added to be  support ,(link-srfi 98)." :similar ())

(get-environment-variables :type r7rs-procedure :synopsis "(get-environment-variables)" :description "Returns names and values of all the environment variables as an a-list.\nThis function is defined by ,(link-srfi 98)" :similar ())

(implementation-name :type extended :synopsis "(implementation-name)" :description "This function is defined in ,(srfi 112); it returns the Scheme\nimplementation (i.e. \"STklos\")." :similar ())

(cpu-architecture :type extended :synopsis "(cpu-architecture)" :description "This function is defined in ,(srfi 112); it returns the CPU\narchitecture, real or virtual, on which this implementation\nis executing." :similar ())

(machine-name :type extended :synopsis "(machine-name)" :description "This function is defined in ,(srfi 112); it returns a name for the\nparticular machine on which the implementation is running." :similar ())

(os-name :type extended :synopsis "(os-name)" :description "This function is defined in ,(srfi 112); it returns the name for\nthe operating system, platform, or equivalent on which the\nimplementation is running." :similar ())

(os-version :type extended :synopsis "(os-version)" :description "This function is defined in ,(srfi 112); it returns the version for\nthe operating system, platform, or equivalent on which the\nimplementation is running." :similar ())

(assume :type extended-syntax :synopsis "(assume obj ...)" :description "The special form |assume| is defined in ,(srfi 145).\nWhen ,(stklos) is in debug mode, this special form is an expression\nthat evaluates to the value of |obj| if |obj| evaluates to a true\nvalue and it is an error if |obj| evaluates to a false value.\n,(linebreak)\nWhen ,(stklos) is not in debug mode, the call to |assume| is elided." :similar ())

(version-alist :type extended :synopsis "(version-alist)" :description "This function returns an association list of STklos properties as defined by\n,(quick-link-srfi 176)." :similar ())

(port-has-port-position? :type extended :synopsis "(port-has-port-position? port)" :description "The port-has-port-position? procedure returns #t if the port\nsupports the port-position operation, and #f otherwise. If the port\ndoes not support the operation, port-position signals an error." :similar ())

(port-position :type extended :synopsis "(port-position port)" :description "The port-position procedure returns an object representing the\ninformation state  about the port current position as is\nnecessary to save and restore that position. This value can be useful\nonly as the pos argument to set-port-position!, if the latter is even\nsupported on the port. However, if the port is binary and the object\nis an exact integer, then it is the position measured in bytes, and\ncan be used to compute a new position some specified number of bytes\naway." :similar ())

(port-has-set-port-position!? :type extended :synopsis "(port-has-set-port-position!? port)" :description "The port-has-set-port-position!? procedure returns #t if the port supports\nthe set-port-position! operation, and #f otherwise." :similar ())

(set-port-position! :type extended :synopsis "(set-port-position! port pos)" :description "For a textual port, it is implementation-defined what happens if pos is not\nthe return value of a call to port-position on port. However, a binary port\nwill also accept an exact integer, in which case the port position is set to\nthe specified number of bytes from the beginning of the port data. If this\nis not sufficient information to specify the port state, or the specified\nposition is uninterpretable by the port, an error satisfying\ni/o-invalid-position-error? is signaled.\n\nIf set-port-position! procedure is invoked on a port that does not support\nthe operation or if pos is not in the range of valid positions of port,\nset-port-position! signals an error. Otherwise, it sets the current position\nof the port to pos. If port is an output port, set-port-position! first flushes\nport (even if the port position will not change).\n\nIf port is a binary output port and the current position is set beyond the\ncurrent end of the data in the underlying data sink, the object is not extended\nuntil new data is written at that position. The contents of any intervening\npositions are unspecified. It is also possible to set the position of a binary\ninput port beyond the end of the data in the data source, but a read will fail\nunless the data has been extended by other means. File ports can always be\nextended in this manner within the limits of the underlying operating system.\nIn other types of ports, if an attempt is made to set the position beyond the\ncurrent end of data in the underlying object, and the object does not support\nextension, an error satisfying i/o-invalid-position-error? is signaled." :similar ())

(make-i/o-invalid-position-error :type extended :synopsis "(make-i/o-invalid-position-error pos)" :description "Returns a condition object which satisfies i/o-invalid-position-error?.\nThe pos argument represents a position passed to set-position!." :similar ())

(i/o-invalid-position-error? :type extended :synopsis "(i/o-invalid-position-error? obj)" :description "Returns #t if obj is an object created by\nmake-i/o-invalid-position-error? or an object raised in the circumstances\ndescribed in SRFI-192 (attempt to access an invalid position in the\nstream), or #f if it is not." :similar ())

(command-name :type extended :synopsis "(command-name)" :description "Returnd the name of the running program if it is a standalone and #f\notherwise. This function is defined in ,(quick-link-srfi 193)." :similar ())

(command-args :type extended :synopsis "(command-args)\n(argv)" :description "Returns a list of the arguments given on the shell command line. The\ninterpreter options are no included in the result. The name |argv| is\ndeprecated and should not be used." :similar (argv))

(argv :see command-args)
(argc :type extended :synopsis "(argc)" :description "Returns the number of arguments present on the command line." :similar ())

(script-file :type extended :synopsis "(script-file)" :description "Returns the absolute path of the current script.\nIf the calling program is not a script, #f is returned.\nThis function is defined in ,(quick-link-srfi 193)." :similar ())

(script-directory :type extended :synopsis "(script-directory)" :description "Returns the non-filename part of script-file as a string.\nAs with |script-file|, this is an absolute pathname." :similar ())

(make-nan :type extended :synopsis "(make-nan negative? quiet? payload)\n(make-nan negative? quiet? payload float)" :description "Returns a NaN whose sign bit is equal to |negative?|  (#t for negative,\n#f for positive), whose quiet bit is equal to quiet? (#t for quiet,\n#f for signaling), and whose payload is the positive exact integer payload.\nIt is an error if payload is larger than a NaN can hold.\n\nThe optional parameter |float|, is never used in ,(stklos).\n\nThis function is defined in ,(quick-link-srfi 208)." :similar ())

(fx*/carry :type extended :synopsis "(fx*/carry i j k)" :description "Returns two values: |i|*|j|+|k|, and carry: it is the value of the computation\n@lisp\n(let*-values (((s) (+ (* i j) k))\n              ((q r) (balanced/ s (expt 2 fx-width))))\n  (values r q))\n@end lisp" :similar ())


;; Source file "boot.stk"


;; Source file "callcc.stk"

(call/cc :type procedure :synopsis "(call-with-current-continuation proc)\n(call/cc proc)" :description " |Proc| must be a procedure of one argument. The procedure\n|call-with-current-continuation| packages up the current continuation\n(see the rationale below) as an ``escape procedure'' and passes it as\nan argument to |proc|. The escape procedure is a Scheme procedure that, if\nit is later called, will abandon whatever continuation is in effect at\nthat later time and will instead use the continuation that was in effect\nwhen the escape procedure was created. Calling the escape procedure may cause\nthe invocation of before and after thunks installed using |dynamic-wind|.\n@l\nThe escape procedure accepts the same number of arguments as\nthe continuation to the original call to\n|call-with-current-continuation|. Except for continuations created\nby the |call-with-values| procedure, all continuations take exactly\none value.\n@l\nThe escape procedure that is passed to proc has unlimited extent\njust like any other procedure in Scheme. It may be stored in variables\nor data structures and may be called as many times as desired.\n@l\nThe following examples show only the most common ways in which\n|call-with-current-continuation| is used. If all real uses were as simple\nas these examples, there would be no need for a procedure with the power\nof |call-with-current-continuation|.\n\n@lisp\n(call-with-current-continuation\n  (lambda (exit)\n    (for-each (lambda (x)\n                (if (negative? x)\n                    (exit x)))\n              '(54 0 37 -3 245 19))\n    #t))                                =>  -3\n\n(define list-length\n  (lambda (obj)\n    (call-with-current-continuation\n      (lambda (return)\n        (letrec ((r\n                  (lambda (obj)\n                    (cond ((null? obj) 0)\n                          ((pair? obj)\n                           (+ (r (cdr obj)) 1))\n                          (else (return #f))))))\n          (r obj))))))\n\n(list-length '(1 2 3 4))                =>  4\n(list-length '(a b . c))                =>  #f\n@end lisp\n\n,(bold \"Rationale:\") A common use of |call-with-current-continuation|\nis for structured, non-local exits from loops or procedure bodies,\nbut in fact |call-with-current-continuation| is extremely useful\nfor implementing a wide variety of advanced control structures.\n@l\nWhenever a Scheme expression is evaluated there is a continuation\nwanting the result of the expression. The continuation represents\nan entire (default) future for the computation. If the expression\nis evaluated at top level, for example, then the continuation\nmight take the result, print it on the screen, prompt for the\nnext input, evaluate it, and so on forever. Most of the time the\ncontinuation includes actions specified by user code, as in a\ncontinuation that will take the result, multiply it by the value\nstored in a local variable, add seven, and give the answer to the\ntop level continuation to be printed. Normally these ubiquitous\ncontinuations are hidden behind the scenes and programmers do not\nthink much about them. On rare occasions, however, a programmer\nmay need to deal with continuations explicitly.\n|Call-with-current-continuation| allows Scheme\nprogrammers to do that by creating a procedure that acts just\nlike the current continuation.\n@l\n,(bold \"Note:\") |call/cc| is just another name for\n|call-with-current-continuation|." :similar (call-with-current-continuation))

(call-with-current-continuation :see call/cc)
(dynamic-wind :type procedure :synopsis "(dynamic-wind before thunk after)" :description "Calls |thunk| without arguments, returning the result(s) of this call.\n|Before| and |after| are called, also without arguments, as required by\nthe following rules (note that in the absence of calls to continuations\ncaptured using |call-with-current-continuation| the three arguments are\ncalled once each, in order).  |Before| is called whenever execution enters\nthe dynamic extent of the call to |thunk| and |after| is called whenever\nit exits that dynamic extent.  The dynamic extent of a procedure call is\nthe period between when the call is initiated and when it returns.\nIn Scheme, because of |call-with-current-continuation|, the dynamic\nextent of a call may not be a single, connected time period. It is\ndefined as follows:\n,(itemize\n  (item [The dynamic extent is entered when execution of the body of\nthe called procedure begins.])\n\n  (item [The dynamic extent is also entered when execution is not\nwithin the dynamic extent and a continuation is invoked that was\ncaptured (using |call-with-current-continuation|) during the dynamic extent.])\n\n  (item [It is exited when the called procedure returns.])\n\n  (item [It is also exited when execution is within the dynamic\nextent and a continuation is invoked that was captured while not within\nthe dynamic extent.]))\n@l\nIf a second call to |dynamic-wind| occurs within the dynamic extent\nof the call to thunk and then a continuation is invoked in such a\nway that the afters from these two invocations of |dynamic-wind|\nare both to be called, then the after associated with the\nsecond (inner) call to |dynamic-wind| is called first.\n\nIf a second call to |dynamic-wind| occurs within the dynamic extent\nof the call to |thunk| and then a continuation is invoked in such a\nway that the befores from these two invocations of |dynamic-wind|\nare both to be called, then the before associated with the\nfirst (outer) call to |dynamic-wind| is called first.\n\nIf invoking a continuation requires calling the |before| from one\ncall to |dynamic-wind| and the |after| from another, then the |after|\nis called first.\n\nThe effect of using a captured continuation to enter or exit the\ndynamic extent of a call to |before| or |after| is undefined.\n@lisp\n(let ((path '())\n      (c #f))\n  (let ((add (lambda (s)\n               (set! path (cons s path)))))\n    (dynamic-wind\n      (lambda () (add 'connect))\n      (lambda ()\n        (add (call-with-current-continuation\n               (lambda (c0)\n                 (set! c c0)\n                 'talk1))))\n      (lambda () (add 'disconnect)))\n    (if (< (length path) 4)\n        (c 'talk2)\n        (reverse path))))\n                  =>  (connect talk1 disconnect\n                       connect talk2 disconnect)\n@end lisp" :similar ())


;; Source file "compiler.stk"

(quote :type syntax :synopsis "(quote <datum>)\n'<datum>" :description "The quoting mechanism is identical to R5RS, except that keywords\nconstants  evaluate \"to themselves\" as numerical constants, string\nconstants, character constants, and boolean constants\n@lisp\n'\"abc\"     =>  \"abc\"\n\"abc\"      =>  \"abc\"\n'145932    =>  145932\n145932     =>  145932\n'#t        =>  #t\n#t         =>  #t\n:foo       =>  :foo\n':foo      =>  :foo\n@end lisp\n,(bold \"Note:\") R5RS requires to quote constant lists and\nconstant vectors. This is not necessary with STklos." :similar ())

(and :type syntax :synopsis "(and <test1> ...)" :description "The |<test>| expressions are evaluated from left to right, and the\nvalue of the first expression that evaluates to a false value is\nreturned.  Any remaining expressions are not evaluated.  If all the\nexpressions evaluate to true values, the value of the last expression\nis returned.  If there are no expressions then |%t| is returned.\n\n@lisp\n  (and (= 2 2) (> 2 1))           =>  #t\n  (and (= 2 2) (< 2 1))           =>  #f\n  (and 1 2 'c '(f g))             =>  (f g)\n  (and)                           =>  #t\n@end lisp" :similar ())

(or :type syntax :synopsis "(or <test1> ...)" :description "The |<test>| expressions are evaluated from left to right, and the\nvalue of the first expression that evaluates to a true value is\nreturned.  Any remaining expressions are not evaluated.  If all\nexpressions evaluate to false values, the value of the last expression\nis returned.  If there are no expressions then |%f| is returned.\n\n@lisp\n  (or (= 2 2) (> 2 1))            =>  #t\n  (or (= 2 2) (< 2 1))            =>  #t\n  (or #f #f #f)                   =>  #f\n  (or (memq 'b '(a b c))\n      (/ 3 0))                    =>  (b c)\n@end lisp" :similar ())

(include :type extended-syntax :synopsis "(include <file>)" :description "TODO" :similar ())


;; Source file "computils.stk"


;; Source file "date.stk"

(time? :type extended :synopsis "(time? obj)" :description "Return |%t| if |obj| is a time object, othererwise returns |%f|." :similar ())

(time->seconds :type extended :synopsis "(time->seconds time)" :description "Convert the time object |time| into an inexact real number representing\nthe number of seconds elapsed since the Epoch.\n@lisp\n(time->seconds (current-time))  ==>  1138983411.09337\n@end lisp" :similar ())

(seconds->time :type extended :synopsis "(seconds->time x)" :description "Converts into a time object the real number |x| representing the number\nof seconds elapsed since the Epoch.\n@lisp\n(seconds->time (+ 10 (time->seconds (current-time))))\n         ==>  a time object representing 10 seconds in the future\n@end lisp" :similar ())

(make-date :type extended :synopsis "(make-date :key second minute hour day month year)" :description "Build a date from its argument. |hour|, |minute|, |second| default to 0;\n|day| and |month| default to 1; |year| defaults to 1970" :similar ())

(date? :type extended :synopsis "(date? obj)" :description "Return |%t| if |obj| is a date, and otherwise returns |%f|." :similar ())

(date-second :type extended :synopsis "(date-second d)" :description "Return the second of date |d|, in the range 0 to 59." :similar ())

(date-minute :type extended :synopsis "(date-minute d)" :description "Return the minute of date |d|, in the range 0 to 59." :similar ())

(date-hour :type extended :synopsis "(date-hour d)" :description "Return the hour of date |d|, in the range 0 to 23." :similar ())

(date-day :type extended :synopsis "(date-day d)" :description "Return the day of date |d|, in the range 1 to 31" :similar ())

(date-month :type extended :synopsis "(date-month d)" :description "Return the month of date |d|, in the range 1 to 12" :similar ())

(date-year :type extended :synopsis "(date-year d)" :description "Return the year of date |d|." :similar ())

(date-week-day :type extended :synopsis "(date-week-day d)" :description "Return the week day of date |d|, in the range 0 to 6 (0 is Sunday)." :similar ())

(date-year-day :type extended :synopsis "(date-year-day d)" :description "Return the the number of days since January 1 of date |d|, in the range\n1 to 366." :similar ())

(date-dst :type extended :synopsis "(date-dst d)" :description "Return an indication about daylight saving adjustment:\n,(itemize\n  (item [0 if no daylight saving adjustment])\n  (item [1 if daylight saving adjustment])\n  (item [-1 if the information is not available]))" :similar ())

(date-tz :type extended :synopsis "(date-tz d)" :description "Return the time zone of date |d|." :similar ())

(seconds->list :type extended :synopsis "(seconds->list sec)" :description "Returns a keyword list for the date given by |sec| (a date based on the\nEpoch). The keyed values returned are\n,(itemize\n(item [second : 0 to 59 (but can be up to 61 to allow for leap seconds)])\n(item [minute : 0 to 59])\n(item [hour : 0 to 23])\n(item [day : 1 to 31])\n(item [month : 1 to 12])\n(item [year : e.g., 2002])\n(item [week-day : 0 (Sunday) to 6 (Saturday)])\n(item [year-day : 0 to 365 (365 in leap years)])\n(item [dst : indication about daylight savings time. See ,(ref :mark \"date-dst\")])\n(item [tz : the difference between Coordinated Universal Time\n(UTC) and local standard time in seconds.])\n)\n@lisp\n(seconds->list (current-second))\n       => (:second 51 :minute 26 :hour 19\n           :day 5 :month 11 :year 2004\n           :week-day 5 :year-day 310\n           :dst 0 :tz -3600)\n@end lisp" :similar ())

(current-date :type extended :synopsis "(current-date)" :description "Returns the current system date." :similar ())

(seconds->string :type extended :synopsis "(seconds->string format n)" :description "Convert a date expressed in seconds using the string |format| as a\nspecification. Conventions for |format| are given below:\n,(itemize\n (item (bold \"~~ \") [a literal ~])\n (item (bold \"~a \") [locale's abbreviated weekday name (Sun...Sat)])\n (item (bold \"~A \") [locale's full weekday name (Sunday...Saturday)])\n (item (bold \"~b \") [locale's abbreviate month name (Jan...Dec)])\n (item (bold \"~B \") [locale's full month day (January...December)])\n (item (bold \"~c \") [locale's date and time\n(e.g., ,(code \"Fri Jul 14 20:28:42-0400 2000\"))])\n (item (bold \"~d \") [day of month, zero padded (01...31)])\n (item (bold \"~D \") [date (mm/dd/yy)])\n (item (bold \"~e \") [day of month, blank padded ( 1...31)])\n (item (bold \"~f \") [seconds+fractional seconds, using locale's\n        decimal separator (e.g. 5.2).])\n (item (bold \"~h \") [same as ~b])\n (item (bold \"~H \") [hour, zero padded, 24-hour clock (00...23)])\n (item (bold \"~I \") [hour, zero padded, 12-hour clock (01...12)])\n (item (bold \"~j \") [day of year, zero padded])\n (item (bold \"~k \") [hour, blank padded, 24-hour clock (00...23)])\n (item (bold \"~l \") [hour, blank padded, 12-hour clock (01...12)])\n (item (bold \"~m \") [month, zero padded (01...12)])\n (item (bold \"~M \") [minute, zero padded (00...59)])\n (item (bold \"~n \") [new line])\n (item (bold \"~p \") [locale's AM or PM])\n (item (bold \"~r \") [time, 12 hour clock, same as ,(code \"~I:~M:~S ~p\")])\n (item (bold \"~s \") [number of full seconds since \"the epoch\" (in UTC)])\n (item (bold \"~S \") [second, zero padded (00...61)])\n (item (bold \"~t \") [horizontal tab])\n (item (bold \"~T \") [time, 24 hour clock, same as ,(code \"~H:~M:~S\")])\n (item (bold \"~U \") [week number of year with Sunday as first day of week\n        (00...53)])\n (item (bold \"~V \") [weekISO 8601:1988 week number of year (01...53)\n      (week 1 is the first week that has at least 4 days in the current year,\n       and  with  Monday  as  the first day of the week)])\n (item (bold \"~w \") [day of week (1...7, 1 is Monday)])\n (item (bold \"~W \") [week number of year with Monday as first day of week\n        (01...52)])\n (item (bold \"~x \") [week number of year with Monday as first day of week\n        (00...53)])\n (item (bold \"~X \") [locale's date representation, for example: \"07/31/00\"])\n (item (bold \"~y \") [last two digits of year (00...99)])\n (item (bold \"~Y \") [year])\n (item (bold \"~z \") [time zone in RFC-822 style])\n (item (bold \"~Z \") [symbol time zone])\n)" :similar ())

(date->string :type extended :synopsis "(date->string format d)" :description "Convert the date |d| using the string |format| as a\nspecification. Conventions for format are the same as the one\nof ,(ref :mark \"seconds->string\")." :similar ())


;; Source file "equiv.stk"


;; Source file "expand.pp"


;; Source file "ffi.stk"

(define-external :type extended-syntax :synopsis "(define-external name parameters option)" :description "The form |define-external| binds a new procedure to |name|.\nThe arity of this new procedure is defined by the typed list of\nparameters given by |parameters|. This parameters list is a list\nof keywords (as defined in the previous table) or couples whose first\nelement is the name of the parameter, and the second one is a type\nkeyword.  All the types defined in the above table, except\n|:void|, are allowed for the parameters of a foreign function.\n,(linebreak)\n|Define-external| accepts several options:\n,(itemize\n(item [\n|:return-type| is used to define the type of the value returned\nby the foreign function. The type returned must be chosen in the types specified\nin the table. For instance:\n@lisp\n(define-external maximum(:int :int)\n   :return-type :int)\n@end lisp\ndefines the foreign function maximum which takes two C integers and\nreturns an integer result. Omitting this option default to a result\ntype equal to |:void| (i.e. the returned value is ,(emph \"undefined\")).\n])\n\n(item [\n|:entry-name| is used to specify the name of the foreign\nfunction in the C world. If this option is omitted, the entry-name is\nsupposed to be |name|. For instance:\n@lisp\n(define-external minimum((a :int) (b :int))\n   :return-type :int\n   :entry-name  \"min\")\n@end lisp\ndefines the Scheme function |minimum| whose application\nexecutes the C function called |min|.\n])\n(item [\n|:library-name| is used to specify the library which contains the\nforeign-function. If necessary, the library is loaded before calling the\nC function. So,\n@lisp\n(define-external minimum((a :int) (b :int))\n   :return-type  :int\n   :entry-name   \"min\"\n    :library-name \"libminmax\")\n@end lisp\ndefines a function which will execute the function |min|\nlocated in the library |libminmax.xx| (where |xx| is the suffix used\nfor shared libraries on the running system (generally |so|))\n])\n)" :similar ())


;; Source file "load.stk"

(build-path-from-shell-variable :type extended :synopsis "(build-path-from-shell-variable var)" :description "TODO" :similar ())

(load-path :type extended :synopsis "(load-path)\n(load-path value)" :description "|load-path| is a parameter object. It\nreturns the current load path. The load path is a list of strings\nwhich correspond to the directories in which a file must be searched for\nloading. Directories of the load path are ,(emph \"prepended\") (in\ntheir apparition\norder) to the file name given to |load| or |try-load| until the file\ncan be loaded.\n@l\nThe initial value of the current load path can be set from the shell, by\nsetting the |STKLOS_LOAD_PATH| shell variable.\n@l\nGiving a |value| to the parameter |load-path| permits to change the\ncurrent list of paths." :similar ())

(load-suffixes :type extended :synopsis "(load-suffixes)\n(load-suffixes value)" :description "|load-suffixes| is a parameter object. It\nreturns the list of possible suffixes for a Scheme file. Each suffix,\nmust be a string. Suffixes are appended (in their apparition order)\nto a file name  is appended to a file name given to |load| or |try-load|\nuntil the file can be loaded." :similar ())

(load-verbose :type extended :synopsis "(load-verbose)\n(load-verbose value)" :description "|load-verbose| is a parameter object. It permits to display the\npath name of the files which are loaded by |load| or |try-load| on\nthe current error port, when set to a true value. If |load-verbose|\nis set to |%f|, no message is printed." :similar ())

(current-loading-file :type extended :synopsis "(current-loading-file)" :description "Returns the path of the file that is currently being load." :similar ())

(find-path :type extended :synopsis "(find-path str)\n(find-path str path)\n(find-path str path suffixes)" :description "In its first form, |find-path| returns the path name of the file\nthat should be loaded by the procedure  |load| given the name |str|.\nThe string returned depends of the current  load path and of the\ncurrently accepted suffixes.\n@l\nThe other forms of |find-path| are more general and allow to give a path\nlist (a list of strings representing supposed directories) and a set\nof suffixes (given as a list of strings too) to try for finding a file.\nIf no file is found, |find-path| returns |%f|.\n@l\nFor instance, on a \"classical\" Unix box:\n@lisp\n(find-path \"passwd\" '(\"/bin\" \"/etc\" \"/tmp\"))\n            => \"/etc/passwd\"\n(find-path \"stdio\" '(\"/usr\" \"/usr/include\") '(\"c\" \"h\" \"stk\"))\n            => \"/usr/include/stdio.h\"\n@end lisp" :similar ())

(provided? :type extended :synopsis "(require string)\n(provide string)\n(require/provide string)\n(provided? string)" :description "|Require| loads the file whose name is |string| if it was not\npreviously ,(q (emph  \"provided\")). |Provide| permits to store |string| in\nthe list of already provided files. Providing a file permits to avoid\nsubsequent loads of this file. |Require/provide| is more or less equivalent to\na |require| followed by a |provide|. |Provided?| returns |%t| if\n|string| was already provided; it returns |%f| otherwise." :similar (require/provide provide require))

(require/provide :see provided?)
(provide :see provided?)
(require :see provided?)
(require-for-syntax :type extended :synopsis "(require-for-syntax string)" :description "" :similar ())

(autoload :type extended :synopsis "(autoload file symbol ...)" :description "TODO\n" :similar ())

(syntax-autoload :type extended :synopsis "(syntax-autoload file symbol ...)" :description "TODO\n" :similar ())


;; Source file "logical.stk"

(bit-shift :type extended :synopsis "(bit-and n1 n2 ...)\n(bit-or n1 n2 ...)\n(bit-xor n1 n2 ...)\n(bit-not n)\n(bit-shift n m)" :description "These procedures allow the manipulation of integers as bit fields.\nThe integers can be of arbitrary length. |Bit-and|, |bit-or| and\n|bit-xor| respectively compute the bitwise ,(emph \"and\"), inclusive and\nexclusive ,(emph \"or\"). |bit-not| returns the bitwise ,(emph \"not\") of |n|.\n|bit-shift| returns the bitwise ,(emph \"shift\") of |n|. The integer |n|\nis shifted left by |m| bits; If |m| is negative, |n| is shifted right by\n|-m| bits.\n\n@lisp\n(bit-or 5 3)       => 7\n(bit-xor 5 3)      => 6\n(bit-and 5 3)      => 1\n(bit-not 5)        => -6\n(bit-or 1 2 4 8)   => 15\n(bit-shift 5 3)    => 40\n(bit-shift 5 -1)   => 2\n@end lisp" :similar (bit-not bit-xor bit-or bit-and))

(bit-not :see bit-shift)
(bit-xor :see bit-shift)
(bit-or :see bit-shift)
(bit-and :see bit-shift)

;; Source file "mbe.stk"

(define-syntax :type syntax :synopsis "(define-syntax <identifier> <transformer-spec>)" :description "|<Define-syntax>|  extends the top-level syntactic environment by binding\nthe |<identifier>| to the specified transformer.\n\n,(bold \"Note:\") |<transformer-spec>| should be an instance of |syntax-rules|.\n@lisp\n(define-syntax let*\n  (syntax-rules ()\n    ((let* () body1 body2 ...)\n     (let () body1 body2 ...))\n    ((let* ((name1 val1) (name2 val2) ...)\n       body1 body2 ...)\n     (let ((name1 val1))\n       (let* (( name2 val2) ...)\n         body1 body2 ...))))\n@end lisp" :similar ())

(syntax-rules :type syntax :synopsis "(syntax-rules <literals> <syntax-rule> ...)" :description "|<literals>| is a list of identifiers, and each |<syntax-rule>| should be of\nthe form\n@lisp\n(pattern template)\n@end lisp\n\nAn instance of |<syntax-rules>| produces a new macro transformer by\nspecifying a sequence of hygienic rewrite rules. A use of a macro\nwhose name is associated with a transformer specified by\n<syntax-rules> is matched against the patterns contained in the\n<syntax-rules>, beginning with the leftmost syntax-rule. When a match is\nfound, the macro use is transcribed hygienically according to the\ntemplate.\n@l\nEach pattern begins with the name for the macro. This name is not\ninvolved in the matching and is not considered a pattern variable or\nliteral identifier.\n@l\n,(bold \"Note:\") For a complete description of the Scheme pattern language,\nrefer to R5RS." :similar ())


;; Source file "module.stk"

(symbol-value* :type extended :synopsis "(symbol-value* symbol module)\n(symbol-value* symbol module default)" :description "Returns the value bound to |symbol| in |module|. If |symbol| is not bound,\nan error is signaled if no |default| is provided, otherwise |symbol-value|\nreturns |default|.\n@l\nNote that this function searches the value of |symbol| in |module|\n,(bold \"and\") all the modules it imports whereas |symbol-value| searches\nonly in |module|." :similar ())

(select-module :type extended-syntax :synopsis "(select-module <name>)" :description "Changes the value of the current module to the module with the given |name|.\nThe expressions evaluated after |select-module| will take place in\nmodule |name| environment.  Module |name| must have been created\npreviously by a |define-module|. The result of |select-module| is\n,(emph \"void\").\n|Select-module| is particularly useful when debugging since it\nallows to place toplevel evaluation in a particular module. The\nfollowing transcript shows an usage of |select-module|.\n,(footnote [This transcript uses the default toplevel loop\n\t       which displays the name of the current module in the evaluator\n\t       prompt.]):\n@lisp\nstklos> (define foo 1)\nstklos> (define-module bar\n          (define foo 2))\nstklos> foo\n1\nstklos> (select-module bar)\nbar> foo\n2\nbar> (select-module stklos)\nstklos>\n@end lisp" :similar ())

(define-module :type extended-syntax :synopsis "(define-module <name> <expr1> <expr2> ...)" :description "|Define-module| evaluates the expressions |<expr1>|, |<expr2>| ... which\nconstitute the body of the module |<name>| in the environment of that module.\n|Name| must be a valid symbol. If this symbol has not already been used to\ndefine a module, a new module, named |name|, is created.\nOtherwise, the expressions |<expr1>|, |<expr2>| ... are evaluated in\nthe environment of the (old) module |<name>|\n,(footnote [In fact |define-module| on a given name\n\t     defines a new module only the first time it is invoked on this name.\n\t     By this way, interactively reloading a module does not define\n\t     a new entity, and the other modules which use it are not altered.]).\nDefinitions done in a module are local to the module and do not interact with\nthe definitions in other modules. Consider the following definitions,\n@lisp\n(define-module M1\n   (define a 1))\n\n(define-module M2\n  (define a 2)\n  (define b (* 2 x)))\n@end lisp\n\nHere, two modules are defined and they both bind the symbol |a| to a\nvalue. However, since |a| has been defined in two distinct modules\nthey denote two different locations.\n@l\nThe |STklos| module, which is predefined, is a special module which\ncontains all the ,(emph \"global variables\") of a R5RS program.  A symbol\ndefined in the |STklos| module, if not hidden by a local definition, is\nalways visible from inside a module. So, in the previous exemple, the\n|x| symbol refers the |x| symbol defined in the |STklos| module.\n@l\nThe result of |define-module| is ,(emph \"void\")." :similar ())

(import :type extended-syntax :synopsis "(import <module1> <module2> ...)" :description "Specifies the modules which are imported by the current module.\nImporting a module makes the symbols it exports visible to the\nimporter, if not hidden by local definitions. When a symbol\nis exported by several of the imported modules, the location denoted by\nthis symbol in the importer module correspond to the one of the first module\nin the list\n@lisp\n(<module1> <module2> ...)\n@end lisp\nwhich exports it.\n@l\nIf several |import| clauses appear in a module, the set of\nimported modules  is determined by appending the various list of modules\nin their apparition order.\n\n@lisp\n(define-module M1\n  (export a b)\n  (define a 'M1-a)\n  (define b 'M1-b))\n\n(define-module M2\n  (export b c d)\n  (define b 'M2-b)\n  (define c 'M2-c)\n  (define d 'M2-d))\n\n(define-module M3\n  (import M1 M2)\n  (display (list a b c d)))  @print{} (M1-a M1-b M2-c M2-d)\n@end lisp\n\n(define-module M4\n  (import M2 M1)\n  (display (list a b c d)))  @print{} (M1-a M2-b M2-c M2-d)\n@end lisp\n\nIt is also possible to import partially (i.e. not all\nexported symbols) from a module, as shown below:\n@lisp\n(define-module M5\n  (import (M2 c d) M1)\n  (display (list a b c d)))  @print{} (M1-a M1-b M2-c M2-d)\n@end lisp\nIn this case, only the symbols |c| and |d| are imported from\nmodule |M2|.\n@l\n,(bold \"Note:\") Importations are not ,(emph \"transitive\"): when\nthe module ,(emph \"C\") imports the module ,(emph \"B\") which is an importer\nof module ,(emph \"A\") the symbols of ,(emph \"A\") are not visible\nfrom ,(emph \"C\"), except  by explicitly importing the ,(emph \"A\")\nmodule from ,(emph \"C\").\n@l\n(bold \"Note:\") The module |STklos|, which contains the ,(emph \"global\nvariables\") is always implicitly imported from a module. Furthermore,\nthis module is always placed at the end of the list of imported modules." :similar ())

(export :type extended-syntax :synopsis "(export <symbol1> <symbol2> ...)" :description "Specifies the symbols which are exported (i.e. ,(emph \"visible\")) outside\nthe current module. By default, symbols defined in a module are not\nvisible outside this module, excepted if they appear in an |export|\nclause.\n@l\nIf several |export| clauses appear in a module, the set of\nexported symbols is determined by ``,(emph \"unionizing\")'' symbols exported\nin all the |export| clauses.\n@l\nThe result of |export| is ,(emph \"void\")." :similar ())

(in-module :type extended-syntax :synopsis "(in-module mod s)\n(in-module mod s default)" :description "This form returns the value of symbol with name |s| in the module with name\n|mod|. If this symbol is not bound,  an error is signaled if no |default| is\nprovided, otherwise |in-module| returns |default|. Note that the value of |s|\nis searched in |mod| and all the modules it imports.\n@l\nThis form is in fact a shortcut. In effect,\n@lisp\n(in-module my-module foo)\n@end lisp\n@l\nis equivalent to\n@lisp\n(symbol-value* 'foo (find-module 'my-module))\n@end lisp" :similar ())


;; Source file "object.stk"

(is-a? :type extended :synopsis "(is-a? obj class)" :description "Returns #t if |obj| is an instance of |class|, and #f otherwise." :similar ())

(find-class :type extended :synopsis "(find-class name)\n(find-class name default)" :description "Returns the class whose name is equal to symbol |name|. If |name| is not\na class instance, the |default| value is returned, if present." :similar ())

(define-class :type extended-syntax :synopsis "(define-class name supers slots . options)" :description "Creates a class whose name is |name|, and whose superclasses are in the\nlist |supers|, with the slots specified by the list |slots|.\n\nAs an example, this is the definition of a point:\n@lisp\n(define-class <point> ()\n  (x y))\n@end lisp\n\nIn another example, a class |<circle>| that inherits |<point>|.\n@lisp\n(define-class <circle> (<point>)\n  (radius))\n@end lisp\n\nThe following options can be passed to slots:\n,(itemize\n   (item [|:init-form| is the default value for the slot.])\n   (item [|:init-keyword| is the keyword for initializing the slot.])\n   (item [|:getter| is the name of the getter method.])\n   (item [|:setter| is the name of the setter method.])\n   (item [|:accessor| is the name of the accessor (setter and getter) method.])\n)\n\nFor example,\n@lisp\n(define-class <point> ()\n  (x :init-form 0 :getter get-x :setter set-x! :init-keyword :x)\n  (y :init-form 0 :getter get-y :setter set-y! :init-keyword :y))\n@end lisp\n\n,(stklos) also defines setters for the specified getters, so the following\nwill work with the definition of |<point>| given above:\n\n@lisp\n(set! (slot-ref my-point 'x) 50)\n@end lisp\n\nAccessors, are methods which can be used as getter and setter, as shown bellow\n\n@lisp\n(define-class <circle> (<point>)\n  ((radius :accessor radius :init-keyword :radius)))\n\n(define x (make <circle> :radius 100))\n(radius x)                             => 100\n(set! (radius x) 200)\n(raidus x)                             => 200\n@end lisp " :similar ())


;; Source file "obsolete.stk"


;; Source file "peephole.stk"


;; Source file "process.stk"

(run-process :type extended :synopsis "(run-process command p1 p2 ...)" :description "|run-process| creates a new process and run the executable\nspecified in |command|. The |p| correspond to the command line\narguments. The following values of |p| have a special meaning:\n,(itemize\n(item [|:input| permits to redirect the standard input file of the\nprocess. Redirection can come from a file or from a pipe. To redirect\nthe standard input from a file, the name of this file must be\nspecified after |:input|. Use the special keyword |:pipe| to\nredirect the standard input from a pipe.])\n\n(item [|:output| permits to redirect the standard output file of the\nprocess. Redirection can go to a file or to a pipe. To redirect\nthe standard output to a file, the name of this file must be\nspecified after |:output|. Use the special keyword |:pipe| to\nredirect the standard output to a pipe.])\n\n(item [|:error| permits to redirect the standard error file of the\nprocess. Redirection can go to a file or to a pipe. To redirect\nthe standard error to a file, the name of this file must be\nspecified after |error|. Use the special keyword |:pipe| to\nredirect the standard error to a pipe.])\n\n(item [|:wait| must be followed by a boolean value. This value\nspecifies if the process must be run asynchronously or not. By\ndefault, the process is run asynchronously (i.e. |:wait| is |%f|).])\n\n(item [|:host| must be followed by a string. This string represents\nthe name of the machine on which the command must be executed. This\noption uses the external command |rsh|. The shell variable\n|PATH| must be correctly set for accessing it without specifying its\nabolute path.])\n\n(item [|:fork| must be followed by a boolean value. This value\nspecifies if a ,(emph \"fork\") system call must be done before running\nthe process. If the process is run without ,(emph \"fork\") the Scheme\nprogram is lost. This feature mimics the ``|exec|'' primitive of the\nUnix shells. By default, a fork is executed before running the process\n(i.e. |:fork| is |%t|). This option works on Unix implementations only.])\n)\n\nThe following example launches a process which executes the\nUnix command |ls| with the arguments |-l| and |/bin|. The lines\nprinted by this command are stored in the file |/tmp/X|\n@lisp\n(run-process \"ls\" \"-l\" \"/bin\" :output \"/tmp/X\")\n@end lisp" :similar ())

(process-kill :type extended :synopsis "(process-kill proc)" :description "Kills (brutally) |process|. The result of |process-kill|\nis ,(emph\"void\"). This procedure is equivalent to\n@lisp\n(process-signal process 'SIGTERM)\n@end lisp" :similar ())

(process-continue :type extended :synopsis "(process-stop proc)\n(process-continue proc)" :description "|Process-stop| stops the execution of |proc| and |process-continue| resumes\nits execution. They are equivalent, respectively, to\n@lisp\n(process-signal process 'SIGSTOP)\n(process-signal process 'SIGCONT)\n@end lisp" :similar (process-stop))

(process-stop :see process-continue)

;; Source file "r5rs.stk"

(lambda :type extended-syntax :synopsis "(lambda <formals> <body>)" :description "A lambda expression evaluates to a procedure. STklos lambda expression\nhave been extended to allow a optional and keyword parameters.\n|<formals>| should have one of the following forms:\n,(itemize\n(item [\n|(<variable1> ...)|\n,(linebreak)\nThe procedure takes a fixed number of arguments;\nwhen the procedure is called, the arguments will be stored in the\nbindings of the corresponding variables.  This form is identical to\nR5RS.\n])\n\n(item [\n|<variable>|\n,(linebreak)\nThe procedure takes any number of arguments; when the\nprocedure is called, the sequence of actual arguments is converted into\na newly allocated list, and the list is stored in the binding of the\n|<variable>|. This form is identical to R5RS.\n])\n\n(item [\n|(<variable1> ... <variablen> . <variablen+1>)|\n,(linebreak)\nIf a space-delimited\nperiod precedes the last variable, then the procedure takes n or more\n arguments, where n is the number of formal arguments before the period\n(there must be at least one). The value stored in the binding of the\nlast variable will be a newly allocated list of the actual arguments left\nover after all the other actual arguments have been matched up against\nthe other formal arguments. This form is identical to R5RS.\n])\n\n(item [\n|(<variable1 ... <variablen> \\[:optional ...\\] \\[:rest ...\\] \\[:key ...\\])|\n,(linebreak)\nThis form is specific to STklos and allows to have procedure with\noptional and keyword parameters. The form |:optional| allows to specify\noptional parameters. All the parameters specified after |:optional| to the end\nof |<formals>| (or until a |:rest| or |:key|) are optional parameters. An\noptional parameter can declared as:\n,(itemize\n(item [\n|variable|: if a value is passed when the procedure is called, it will be\nstored in the binding of the corresponding variable, otherwise the value |%f|\nwill be stored in it.\n])\n(item [\n|(variable value)|: if a value is passed when the procedure is called, it\nwill be stored in the binding of the corresponding variable, otherwise |value|\nwill be stored in it.\n])\n(item [\n|(variable value test?)|: if a value is passed when the procedure is called, it\nwill be stored in the binding of the corresponding variable, otherwise |value|\nwill be stored in it. Furthermore, |test?| will be given the value |%t| if\na value is passed for the given variable, otherwise |test?| is set to |%f|\n])\n)\n@l\n\nHereafter are some examples using |:optional| parameters\n@lisp\n((lambda (a b :optional c d) (list a b c d)) 1 2)\n                            => (1 2 #f #f)\n((lambda (a b :optional c d) (list a b c d)) 1 2 3)\n                            => (1 2 3 #f)\n((lambda (a b :optional c (d 100)) (list a b c d)) 1 2 3)\n                            => (1 2 3 100)\n((lambda (a b :optional c (d #f d?)) (list a b c d d?)) 1 2 3)\n                            => (1 2 3 #f #f)\n@end lisp\nThe form |:rest| parameter is similar to the dot notation seen before.\nIt is used before an identifier to collects the parameters in a single\nbinding:\n@lisp\n((lambda (a :rest b) (list a b)) 1)\n                            => (1 ())\n((lambda (a :rest b) (list a b)) 1 2)\n                            => (1 (2))\n((lambda (a :rest b) (list a b)) 1 2 3)\n                            => (1 (2 3))\n@end lisp\nThe form |:key| allows to use keyword parameter passing. All the parameters\nspecified after |:key| to the end of |<formals>| are keyword parameters. A\nkeyword  parameter can be declared using the three forms given for optional\nparameters. Here are some examples illustrating how to declare and how to use\nkeyword parameters:\n@lisp\n((lambda (a :key b c) (list a b c)) 1 :c 2 :b 3)\n                            => (1 3 2)\n((lambda (a :key b c) (list a b c)) 1 :c 2)\n                            => (1 #f 2)\n((lambda (a :key (b 100 b?) c) (list a b c b?)) 1 :c 2)\n                            => (1 100 2 #f)\n@end lisp\nAt last, here is an example showing |:optional| |:rest| and |:key| parameters\n@lisp\n(define f (lambda (a :optional b :rest c :key d e)\n             (list a b c d e)))\n\n(f 1)                       => (1 #f () #f #f)\n(f 1 2)                     => (1 2 () #f #f)\n(f 1 2 :d 3 :e 4)           => (1 2 (:d 3 :e 4) 3 4)\n(f 1 :d 3 :e 4)             => (1 #f (:d 3 :e 4) 3 4)\n@end lisp\n])\n)" :similar ())

(set! :type syntax :synopsis "(set! <variable> <expression>)\n(set! (<proc> <arg> ...) <expression>)" :description "The first form of |set!| is the R5RS one:\n@l\n|<Expression>| is evaluated, and the resulting value is stored in\nthe location to which |<variable>| is bound. |<Variable>| must be bound\neither in some region enclosing the |set!| expression or at top level.\n\n@lisp\n(define x 2)\n(+ x 1)                   =>  3\n(set! x 4)                =>  unspecified\n(+ x 1)                   =>  5\n@end lisp\n\nThe second form of |set!| is defined in ,(link-srfi 17):\n@l\nThis special form |set!|\nis extended so the first operand can be a procedure application, and not\njust a variable. The procedure is typically one that extracts a component\nfrom some data structure. Informally, when the procedure is called in the\nfirst operand of |set!|, it causes the corresponding component to be\nreplaced by the second operand. For example,\n@lisp\n(set (vector-ref x i) v)\n@end lisp\nwould be equivalent to:\n@lisp\n(vector-set! x i v)\n@end lisp\n\nEach procedure that may be used as the first operand to |set!| must have\na corresponding ,(emph \"setter\") procedure. The procedure |setter| (see below)\ntakes a procedure and returns the corresponding setter procedure.\nSo,\n@lisp\n(set! (proc arg ...) value)\n@end lisp\nis equivalent to the call\n@lisp\n((setter proc) arg ... value)\n@end lisp\n\nThe result of the |set!| expression is unspecified." :similar ())

(if :type syntax :synopsis "(if <test> <consequent> <alternate>)\n(if <test> <consequent>)" :description "An |if| expression is evaluated as follows: first, |<test>| is\nevaluated.  If it yields a true value, then |<consequent>| is\nevaluated and its value(s) is(are) returned.  Otherwise |<alternate>|\nis evaluated and its value(s) is(are) returned.  If |<test>| yields a\nfalse value and no |<alternate>| is specified, then the result of the\nexpression is ,(emph \"void\").\n\n@lisp\n  (if (> 3 2) 'yes 'no)           =>  yes\n  (if (> 2 3) 'yes 'no)           =>  no\n  (if (> 3 2)\n      (- 3 2)\n      (+ 3 2))                    =>  1\n@end lisp" :similar ())

(cond :type syntax :synopsis "(cond <clause1> <clause2> ...)" :description "In a |cond|, each |<clause>| should be of the form\n\n@lisp\n(<test> <expression1> ...)\n@end lisp\n\nwhere |<test>| is any expression.  Alternatively, a |<clause>| may be\nof the form\n\n@lisp\n(<test> => <expression>)\n@end lisp\n\nThe last |<clause>| may be an \"else clause,\" which has the form\n@lisp\n(else <expression1> <expression2> ...)\n@end lisp\n\nA cond expression is evaluated by evaluating the |<test>| expressions\nof successive |<clause>|s in order until one of them evaluates to a\ntrue value When a |<test>| evaluates to a true value, then the\nremaining |<expression>|s in its |<clause>| are evaluated in order,\nand the result(s) of the last |<expression>| in the |<clause>| is(are)\nreturned as the result(s) of the entire cond expression.  If the\nselected |<clause>| contains only the |<test>| and no |<expression>|s,\nthen the value of the |<test>| is returned as the result.  If the\nselected |<clause>| uses the => alternate form, then the\n|<expression>| is evaluated.  Its value must be a procedure that\naccepts one argument; this procedure is then called on the value of\nthe |<test>| and the value(s) returned by this procedure is(are)\nreturned by the cond expression.\n@l\nIf all |<test>|s evaluate to false\nvalues, and there is no else clause, then the result of the\nconditional expression is ,(emph \"void\"); if there is an else clause,\nthen its |<expression>|s are evaluated, and the value(s) of the last\none is(are) returned.\n\n@lisp\n  (cond ((> 3 2) 'greater)\n        ((< 3 2) 'less))                    =>  greater\n\n  (cond ((> 3 3) 'greater)\n        ((< 3 3) 'less)\n        (else 'equal))                      =>  equal\n\n  (cond ((assv 'b '((a 1) (b 2))) => cadr)\n        (else #f))                          =>  2\n@end lisp" :similar ())

(case :type r7rs-syntax :synopsis "(case <key> <clause1> <clause2> ...)" :description "In a |case|, each |<clause>| should have the form\n\n@lisp\n((<datum1> ...) <expression1> <expression2> ...),\n@end lisp\n\nwhere each |<datum>| is an external representation of some object.  All the\n|<datum>|s must be distinct.  The last |<clause>| may be an \"else clause,\" which\nhas the form\n\n@lisp\n    (else <expression1> <expression2> ...).\n@end lisp\n\nA case expression is evaluated as follows. |<Key>| is evaluated and\nits result is compared against each |<datum>|.  If the result of\nevaluating |<key>| is equivalent (in the sense of eqv?) to a\n|<datum>|, then the expressions in the corresponding |<clause>| are\nevaluated from left to right and the result(s) of the last expression\nin the |<clause>| is(are) returned as the result(s) of the case\nexpression.  If the result of evaluating |<key>| is different from\nevery |<datum>|, then if there is an else clause its expressions are\nevaluated and the result(s) of the last is(are) the result(s) of the\ncase expression; otherwise the result of the case expression is ,(emph \"void\").\n\nIf the selected |<clause>| or else clause uses the |=>| alternate\nform, then the |expression| is evaluated. It is an error if\nits value is not a procedure accepting one argument. This\nprocedure is then called on the value of the hkeyi and the\nvalues returned by this procedure are returned by the case\nexpression.\n\n@lisp\n  (case (* 2 3)\n    ((2 3 5 7) 'prime)\n    ((1 4 6 8 9) 'composite))     =>  composite\n  (case (car '(c d))\n    ((a) 'a)\n    ((b) 'b))                     =>  void\n  (case (car '(c d))\n    ((a e i o u) 'vowel)\n    ((w y) 'semivowel)\n    (else 'consonant))            =>  consonant\n  (case (car '(c d))\n    ((a e i o u) 'vowel)\n    ((w y) 'semivowel)\n    (else  => (lambda (x) (x))))  =>  c\n@end lisp\n" :similar ())

(when :type extended-syntax :synopsis "(when <test> <expression1> <expression2> ...)" :description "If the |<test>| expression yields a true value, the |<expression>|s are\nevaluated from left to right and the value of the last |<expression>| is\nreturned. Otherwise, |when| returns ,(emph \"void\")." :similar ())

(unless :type extended-syntax :synopsis "(unless <test> <expression1> <expression2> ...)" :description "If the |<test>| expression yields a false value, the |<expression>|s are\nevaluated from left to right and the value of the last |<expression>| is\nreturned. Otherwise, |unless| returns ,(emph \"void\")." :similar ())

(let :type syntax :synopsis "(let <bindings> <body>)\n(let <variable> <bindings> <body>)" :description "In a |let|, |<bindings>| should have the form\n\n@lisp\n((<variable1> <init1>) ...)\n@end lisp\n\nwhere each |<init>| is an expression, and |<body>| should be a sequence of one or\nmore expressions.  It is an error for a |<variable>| to appear more than once in\nthe list of variables being bound.\n@l\nThe |<init>|s are evaluated in the current environment (in some\nunspecified order), the |<variable>|s are bound to fresh locations holding the\nresults, the |<body>| is evaluated in the extended environment, and the value(s)\nof the last expression of |<body>| is(are) returned.  Each binding of a\n|<variable>| has |<body>| as its region.\n\n@lisp\n(let ((x 2) (y 3))\n  (* x y))                      =>  6\n\n(let ((x 2) (y 3))\n  (let ((x 7)\n        (z (+ x y)))\n    (* z x)))                   =>  35\n@end lisp\n\nThe second form of |let|, which is generally called a ,(emph \"named let\"),\nis a variant on the syntax of let which provides a more general\nlooping construct than |do| (@pxref{do}) and may also be used to\nexpress recursions. It has the same syntax and semantics as ordinary\nlet except that |<variable>| is bound within |<body>| to a procedure whose\nformal arguments are the bound variables and whose body is |<body>|.\nThus the execution of |<body>| may be repeated by invoking the procedure\nnamed by |<variable>|.\n\n@lisp\n(let loop ((numbers '(3 -2 1 6 -5))\n           (nonneg  '())\n           (neg     '()))\n  (cond ((null? numbers) (list nonneg neg))\n        ((>= (car numbers) 0)\n           (loop (cdr numbers)\n                 (cons (car numbers) nonneg)\n                 neg))\n        ((< (car numbers) 0)\n           (loop (cdr numbers)\n                  nonneg\n                  (cons (car numbers) neg)))))\n   =>  ((6 1 3) (-5 -2))\n@end lisp" :similar ())

(let* :type syntax :synopsis "(let* <bindings> <body>)" :description "In a |let*|, |<bindings>| should have the same form as in a |let| (however, a\n<variable> can appear more than once in the list of variables being bound).\n@l\n|Let*| is similar to |let|, but the bindings are performed sequentially\nfrom left to right, and the region of a binding indicated by\n@lisp\n(<variable> <init>)\n@end lisp\nis that part of the |let*| expression to the right of the binding.  Thus\nthe second binding is done in an environment in which the first binding is\nvisible, and so on.\n\n@lisp\n(let ((x 2) (y 3))\n  (let* ((x 7)\n         (z (+ x y)))\n    (* z x)))             =>  70\n@end lisp" :similar ())

(letrec :type syntax :synopsis "(letrec <bindings> <body>)" :description "<bindings> should have the form as in |let|.\n\nThe |<variable>|s are bound to fresh locations holding undefined\nvalues, the |<init>|s are evaluated in the resulting environment (in\nsome unspecified order), each |<variable>| is assigned to the result\nof the corresponding |<init>|, the |<body>| is evaluated in the\nresulting environment, and the value(s) of the last expression in\n|<body>| is(are) returned.  Each binding of a |<variable>| has the\nentire |letrec| expression as its region, making it possible to define\nmutually recursive procedures.\n\n@lisp\n(letrec ((even? (lambda (n)\n                  (if (zero? n)\n                      #t\n                      (odd? (- n 1)))))\n         (odd?  (lambda (n)\n                  (if (zero? n)\n                      #f\n                      (even? (- n 1))))))\n  (even? 88))\n                  =>  #t\n@end lisp" :similar ())

(begin :type syntax :synopsis "(begin <expression1> <expression2> ...)" :description "The |<expression>|s are evaluated sequentially from left to right, and the\nvalue(s) of the last |<expression>| is(are) returned.  This expression type is\nused to sequence side effects such as input and output.\n\n@lisp\n  (define x 0)\n\n  (begin (set! x 5)\n         (+ x 1))                  =>  6\n\n  (begin (display \"4 plus 1 equals \")\n         (display (+ 4 1)))        @print{} 4 plus 1 equals 5\n                                   =>  void\n@end lisp" :similar ())

(do :type syntax :synopsis "(do [[<var1> <init1> <step1>] ...] [<test> <expr> ...] <command> ...)" :description "|Do| is an iteration construct.  It specifies a set of variables to be\nbound, how they are to be initialized at the start, and how they are\nto be updated on each iteration.  When a termination condition is met,\nthe loop exits after evaluating the |<expr>|s.\n@l\n|Do| expressions are evaluated as follows: The |<init>| expressions\nare evaluated (in some unspecified order), the |<var>|s are bound\nto fresh locations, the results of the |<init>| expressions are stored\nin the bindings of the |<var>|s, and then the iteration phase\nbegins.\n@l\nEach iteration begins by evaluating |<test>|; if the result is false\nthen the |<command>| expressions are evaluated in order for effect,\nthe |<step>| expressions are evaluated in some unspecified order, the\n|<var>|s are bound to fresh locations, the results of the |<step>|s\nare stored in the bindings of the |<var>|s, and the next iteration\nbegins.\n@l\nIf |<test>| evaluates to a true value, then the |<expr>|s are\nevaluated from left to right and the value(s) of the last |<expr>|\nis(are) returned.  If no |<expr>|s are present, then the value of\nthe do expression is ,(emph \"void\").\n@l\nThe region of the binding of a |<var>| consists of the entire do\nexpression except for the |<init>|s.  It is an error for a |<var>| to\nappear more than once in the list of do variables.\n@l\nA |<step>| may be omitted, in which case the effect is the same as if\n@lisp\n(<var> <init> <var>)\n@end lisp\nhad been written.\n\n@lisp\n  (do ((vec (make-vector 5))\n       (i 0 (+ i 1)))\n      ((= i 5) vec)\n    (vector-set! vec i i))            =>  #(0 1 2 3 4)\n\n  (let ((x '(1 3 5 7 9)))\n    (do ((x x (cdr x))\n         (sum 0 (+ sum (car x))))\n        ((null? x) sum)))             =>  25\n@end lisp" :similar ())

(quasiquote :type syntax :synopsis "(quasiquote <template>)\n`<template>" :description "\"Backquote\" or \"quasiquote\" expressions are useful for constructing a\nlist or vector structure when most but not all of the desired structure\nis known in advance.  If no commas appear within the |<template>|,\nthe result of evaluating |`<template>| is equivalent to the result of\nevaluating |'<template>|.  If a comma appears within the\n|<template>|, however, the expression following the comma is evaluated\n(\"unquoted\") and its result is inserted into the structure instead of\nthe comma and the expression.  If a comma appears followed immediately\nby an at-sign (@), then the following expression must evaluate to a\nlist; the opening and closing parentheses of the list are then\n\"stripped away\" and the elements of the list are inserted in place of the comma\nat-sign expression sequence.  A comma at-sign should only appear within\na list or vector |<template>|.\n\n@lisp\n`(list \\,(+ 1 2) 4)  =>  (list 3 4)\n(let ((name 'a)) `(list ,name ',name))\n                    =>  (list a (quote a))\n`(a \\,(+ 1 2) ,@(map abs '(4 -5 6)) b)\n                    =>  (a 3 4 5 6 b)\n`((foo \\,(- 10 3)) ,@(cdr '(c)) . ,(car '(cons)))\n                    =>  ((foo 7) . cons)\n`#(10 5 \\,(sqrt 4) ,@(map sqrt '(16 9)) 8)\n                    =>  #(10 5 2 4 3 8)\n@end lisp\n\nQuasiquote forms may be nested.  Substitutions are made only for unquoted\ncomponents appearing at the same nesting level as the outermost backquote.\nThe nesting level increases by one inside each successive quasiquotation,\nand decreases by one inside each unquotation.\n\n@lisp\n`(a `(b \\,(+ 1 2) \\,(foo \\,(+ 1 3) d) e) f)\n          =>  (a `(b \\,(+ 1 2) \\,(foo 4 d) e) f)\n(let ((name1 'x)\n      (name2 'y))\n  `(a `(b ,,name1 ,',name2 d) e))\n          =>  (a `(b ,x ,'y d) e)\n@end lisp\n\nThe two notations |`<template>| and |(quasiquote <template>)| are identical\nin all respects.  |,<expression>| is identical to |(unquote <expression>)|, and\n|,@<expression>| is identical to |(unquote-splicing <expression>)|.\n\n" :similar ())

(define-macro :type extended-syntax :synopsis "(define-macro (<name> <formals>) <body>)\n(define-macro <name> (lambda <formals> <body>))" :description "|define-macro| can be used to define low-level macro\n(i.e. ,(emph \"non hygienic\") macros). This form is similar to the\n|defmacro| form of Common Lisp.\n@lisp\n(define-macro (incr x) `(set! ,x (+ ,x 1)))\n(let ((a 1)) (incr a) a)   => 2\n\n(define-macro (when test . body)\n  `(if ,test ,@(if (null? (cdr body)) body `((begin ,@body)))))\n(macro-expand '(when a b)) => (if a b)\n(macro-expand '(when a b c d))\n                           => (if a (begin b c d))\n\n(define-macro (my-and . exprs)\n  (cond\n   ((null? exprs)        #t)\n   ((= (length exprs) 1) (car exprs))\n   (else                 `(if \\,(car exprs)\n                           (my-and ,@(cdr exprs))\n                           #f))))\n(macro-expand '(my-and a b c))\n                          => (if a (my-and b c) #f)\n@end lisp" :similar ())

(macro-expand :type extended :synopsis "(macro-expand form)" :description "Returns the macro expansion of |form| if it is a macro call,\notherwise |form| is returned unchanged.\n\n@lisp\n(define-macro (incr x) `(set! ,x (+ ,x 1)))\n(macro-expand '(incr foo)) => (set! foo (+ foo 1))\n(macro-expand '(car bar))  => (car bar)\n@end lisp" :similar ())

(eval :type procedure :synopsis "(eval expression environment)\n(eval expression)" :description "Evaluates expression in the specified environment and returns its\nvalue. |Expression| must be a valid Scheme expression represented\nas data. |Environment| may be a R5RS environment-specifier\n(|interaction-environment|, |scheme-report-environment| or\n|null-environment|) or a ,(stklos) module.\n@lisp\n(eval '(* 7 3) (scheme-report-environment 5))\n              => 21\n(let ((f (eval '(lambda (f x) (f x x))\n               (null-environment 5))))\n  (f + 10))\n              => 20\n(define-module A\n  (define x 1))\n(eval '(cons x x) (find-module 'A))\n              => (1 . 1)\n@end lisp" :similar ())

(cddddr :type procedure :synopsis "(caar pair)\n(cadr pair)\n...\n(cdddar pair)\n(cddddr pair)" :description "These procedures are compositions of |car| and |cdr|, where for example\n|caddr| could be defined by\n@lisp\n   (define caddr (lambda (x) (car (cdr (cdr x)))))\n@end lisp\nArbitrary compositions, up to four deep, are provided.\nThere are twenty-eight of these procedures in all." :similar (cadddr cdaddr caaddr cddadr cadadr cdaadr caaadr cdddar caddar cdadar caadar cddaar cadaar cdaaar caaaar cdddr caddr cdadr caadr cddar cadar cdaar caaar cddr cadr cdar caar))

(cadddr :see cddddr)
(cdaddr :see cddddr)
(caaddr :see cddddr)
(cddadr :see cddddr)
(cadadr :see cddddr)
(cdaadr :see cddddr)
(caaadr :see cddddr)
(cdddar :see cddddr)
(caddar :see cddddr)
(cdadar :see cddddr)
(caadar :see cddddr)
(cddaar :see cddddr)
(cadaar :see cddddr)
(cdaaar :see cddddr)
(caaaar :see cddddr)
(cdddr :see cddddr)
(caddr :see cddddr)
(cdadr :see cddddr)
(caadr :see cddddr)
(cddar :see cddddr)
(cadar :see cddddr)
(cdaar :see cddddr)
(caaar :see cddddr)
(cddr :see cddddr)
(cadr :see cddddr)
(cdar :see cddddr)
(caar :see cddddr)
(with-output-to-file :type procedure :synopsis "(with-input-from-file string thunk)\n(with-output-to-file string thunk)" :description "|String| should be a string naming a file, and |proc| should be a\nprocedure of no arguments. For |with-input-from-file|, the file should\nalready exist. The file is opened for input or output, an input or output\nport connected to it is made the default value returned by\n|current-input-port| or |current-output-port| (and is used by |(read)|,\n|(write obj)|, and so forth), and the thunk is called with no arguments.\nWhen the thunk returns, the port is closed and the previous default is\nrestored. |With-input-from-file| and |with-output-to-file| return(s)\nthe value(s) yielded by thunk.\n@l\nThe following example uses a pipe port opened for reading. It permits to\nread all the lines produced by an external ,(emph \"ls\") command (i.e. the\noutput of the ,(emph \"ls\") command is ,(emph \"redirected\") to the Scheme pipe\nport).\n@lisp\n(with-input-from-file \"@pipe ls -ls\"\n  (lambda ()\n    (do ((l (read-line) (read-line)))\n        ((eof-object? l))\n      (display l)\n      (newline))))\n@end lisp\n\nHereafter is another example of Unix command redirection. This time,\nit is the standard input of the Unix command which is redirected.\n@lisp\n(with-output-to-file \"@pipe mail root\"\n  (lambda ()\n    (display \"A simple mail from Scheme\")\n    (newline)))\n@end lisp" :similar (with-input-from-file))

(with-input-from-file :see with-output-to-file)
(with-error-to-file :type extended :synopsis "(with-error-to-file string thunk)" :description "This procedure is similar to with-output-to-file, excepted that it uses the\ncurrent error port instead of the output port." :similar ())

(with-input-from-string :type extended :synopsis "(with-input-from-string string thunk)" :description "A string port is opened for input from |string|. |Current-input-port|\nis set to the port and |thunk| is called. When |thunk| returns,\nthe previous default input port is restored. |With-input-from-string|\nreturns the value(s) computed by |thunk|.\n@lisp\n(with-input-from-string \"123 456\"\n  (lambda () (read)))                       =>  123\n@end lisp" :similar ())

(with-output-to-string :type extended :synopsis "(with-output-to-string thunk)" :description "A string port is opened for output. |Current-output-port|\nis set to it and |thunk| is called. When |thunk| returns,\nthe previous default output port is restored. |With-output-to-string|\nreturns the string containing the text written on the string port.\n@lisp\n(with-output-to-string\n   (lambda () (write 123) (write \"Hello\"))) => \"123\\\\\"Hello\\\\\"\"\n@end lisp" :similar ())

(with-error-to-port :type extended :synopsis "(with-input-from-port port thunk)\n(with-output-to-port port thunk)\n(with-error-to-port port thunk)" :description "|Port| should be a port, and |proc| should be a\nprocedure of no arguments. These procedures do a job similar to the\n|with-...-file| counterparts  excepted that they use an open port instead\nof string specifying a file name" :similar (with-output-to-port with-input-from-port))

(with-output-to-port :see with-error-to-port)
(with-input-from-port :see with-error-to-port)
(call-with-output-file :type procedure :synopsis "(call-with-input-file string proc)\n(call-with-output-file string proc)" :description "|String| should be a string naming a file, and |proc| should be a procedure\nthat accepts one argument. For |call-with-input-file|, the file should\nalready exist. These procedures call |proc| with one argument: the port\nobtained by opening the named file for input or output. If the file cannot\nbe opened, an error is signaled. If |proc| returns, then the port is closed\nautomatically and the value(s) yielded by the proc is(are) returned.\nIf proc does not return, then the port will not be closed automatically.\n@l\n,(bold \"Rationale:\") Because Scheme's escape procedures have unlimited extent,\nit is possible to escape from the current continuation but later to escape\nback in. If implementations were permitted to close the port on any escape\nfrom the current continuation, then it would be impossible to write portable\ncode using both |call-with-current-continuation| and |call-with-input-file|\nor |call-with-output-file|." :similar (call-with-input-file))

(call-with-input-file :see call-with-output-file)
(rationalize :type procedure :synopsis "(rationalize x y)" :description "Rationalize returns the simplest rational number differing from |x|\nby no more than |y|. A rational number |r1| is simpler than another\nrational number |r2| if |r1| = |p1/q1| and |r2| = |p2/q2| (in lowest\nterms) and abs(p1) <= abs(p2) and abs(q1) <= abs(q2). Thus |3/5| is\nsimpler than |4/7|. Although not all rationals are comparable in\nthis ordering  (consider |2/7| and |3/5|) any interval contains a\nrational number that\nis simpler than every other rational number in that interval (the\nsimpler |2/5| lies between |2/7| and |3/5|). Note that |0| = |0/1| is the\nsimplest rational of all.\n@lisp\n(rationalize\n   (inexact->exact .3) 1/10)  => 1/3    ; exact\n(rationalize .3 1/10)         => #i1/3  ; inexact\n@end lisp" :similar ())

(call-with-values :type procedure :synopsis "(call-with-values producer consumer)" :description "Calls its producer argument with no values and a continuation that,\nwhen passed some values, calls the consumer procedure with those values\nas arguments. The continuation for the call to consumer is the\ncontinuation of the call to call-with-values.\n@lisp\n(call-with-values (lambda () (values 4 5))\n                  (lambda (a b) b))                =>  5\n\n(call-with-values * -)                             =>  -1\n@end lisp" :similar ())


;; Source file "r7rs.stk"

(letrec* :type r7rs-syntax :synopsis "(letrec* <bindings> <body>)" :description "<bindings> should have the form as in |let| and body is a sequence\nof zero or more definitions followed by one or more expressions.\n\nThe |<variable>|s are bound to fresh locations, each |variable| is\nassigned in left-to-right order to the result of evaluating the\ncorresponding |init|, the |body| is evaluated in the resulting\nenvironment, and the values of the last expression in |body| are\nreturned. Despite the left-to-right evaluation and assignment order,\neach binding of a |variable| has the entire |letrec*| expression as its\nregion, making it possible to define mutually recursive procedures.\nIf it is not possible to evaluate each |init| without assigning or\nreferring to the value of the corresponding |variable| or the\n|variable| of any of the bindings that follow it in |bindings|, it is\nan error.\n\n@lisp\n(letrec* ((p (lambda (x)\n               (+ 1 (q (- x 1)))))\n          (q(lambda (y)\n              (if (zero? y)\n                  0\n                  (+ 1 (p (- y 1))))))\n          (x (p 5))\n          (y x))\n  y)  => 5\n@end lisp" :similar ())

(let-values :type r7rs-syntax :synopsis "(let-values ((<formals> <expression>) ...) <body>)" :description "Each |<formals>| should be a formal arguments list as for a |lambda| expression.\n\nThe |<expression>|s are evaluated in the current environment,\nthe variables of the |<formals>| are bound to fresh locations, the return\nvalues of the |<expression>|s are stored in the variables, the |<body>| is\nevaluated in the extended environment, and the values of the last expression\nof |<body>| are returned.\n\nThe matching of each |<formals>| to values is as for the matching of\n|<formals>| to arguments in a |lambda| expression, and it is an error\nfor an |<expression>| to return a number of values that does not match\nits corresponding |<formals>|.\n@lisp\n(let-values (((root rem) (exact-integer-sqrt 32)))\n   (* root rem))            =>  35\n\n(let ((a 'a) (b 'b) (x 'x) (y 'y))\n   (let-values (((a b) (values x y))\n                ((x y) (values a b)))\n     (list a b x y)))      => (x y a b)\n@end lisp" :similar ())

(let*-values :type r7rs-syntax :synopsis "(let-values ((<formals> <expression>) ...) <body>)" :description "Each |<formals>| should be a formal arguments list as for a |lambda| expression.\n\n|let*-values| is similar to |let-values|, but the bindings are performed\nsequentially from left to right, and the region of a binding indicated by\n|(<formals> <expression>)| is that part of the |let*-values| expression to\nthe right of the binding. Thus the second binding is done in an environment\nin which the first binding is visible, and so on.\n@lisp\n(let ((a 'a) (b 'b) (x 'x) (y 'y))\n   (let*-values (((a b) (values x y))\n                ((x y) (values a b)))\n     (list a b x y)))      => (x y x y)\n@end lisp" :similar ())

(delay :type syntax :synopsis "(delay <expression>)" :description "The |delay| construct is used together with the procedure |force|\nto implement ,(emph \"lazy evaluation\") or ,(emph \"call by need\"). |(delay\n<expression>)| returns an object called a ,(emph \"promise\") which at some\npoint in the future may be asked (by the |force| procedure) to\nevaluate |<expression>|, and deliver the resulting value.\nThe effect of |<expression>| returning multiple values is unpredictable.\n\nSee the description of |force| (@pxref{force}) for a more complete\ndescription of |delay|." :similar ())

(delay-force :type r7rs-syntax :synopsis "(delay-force <expression>)\n(lazy <expression>)" :description "The expression |(delay-force expression)| is conceptually similar\nto |(delay (force expression))|, with the difference that forcing the result\nof |delay-force| will in effect result in a tail call to |(force expression)|,\nwhile forcing the result of |(delay (force expression))| might not. Thus\niterative lazy algorithms that might result in a long series of chains of\n|delay| and |force| can be rewritten using |delay-force| to prevent consuming\nunbounded space during evaluation.\n\nThe special form |delay-force| appears with name |lazy| in SRFI-45.\n" :similar (lazy))

(lazy :see delay-force)
(make-promise :type r7rs-procedure :synopsis "(make-promise obj)\n(eager obj)" :description "The |make-promise| procedure returns a promise which,\nwhen forced, will return |obj| . It is similar to |delay|, but\ndoes not delay its argument: it is a procedure rather than\nsyntax. If |obj| is already a promise, it is returned.\n\nThe primitve |make-promise| appears with name |eager| in\nSRFI-45." :similar (eager))

(eager :see make-promise)
(define-values :type r7rs-procedure :synopsis "(define-values formals expression)" :description "The form |define-values| creates multiple definitions from a single expression\nreturning multiple values. Here, |expression| is evaluated, and the |formals|\nare bound to the return values in the same way that the |formals| in a\nlambda expression are matched to the arguments in a procedure call.\n\n@lisp\n(let ()\n  (define-values (x y) (exact-integer-sqrt 17))\n  (list x y))                   => (4 1)\n\n(let ()\n   (define-values (x y) (values 1 2))\n   (+ x y))                     => 3\n\n(let ()\n   (define-values (x . y) (values 1 2 3))\n   (list x y)                  => (1 (2 3))\n@end lisp" :similar ())

(exact-integer? :type r7rs-procedure :synopsis "(exact->integer? z)" :description "Returns  #t if z is both exact and an integer; otherwise returns #f.\n\n@lisp\n(exact-integer? 32)   => #t\n(exact-integer? 32.0) => #f\n(exact-integer? 32/5) => #f\n@end lisp" :similar ())

(truncate-remainder :type r7rs-procedure :synopsis "(floor/ n1 n2)\n(floor-quotient n1 n2)\n(floor-remainder n1 n2)\n(truncate/ n1 n2)\n(truncate-quotient n1 n2)\n(truncate-remainder n1 n2)" :description "These procedures implement number-theoretic (integer) division.  It is\nan error if |n2| is zero. The procedures ending in '/' return two integers;\nthe other procedures return an integer.  All the procedures compute a\nquotient |q| and remainder |r| such that |n1=n2*q+r|.\n\n See R7RS for more information.\n\n@lisp\n(floor/ 5 2)         => 2 1\n(floor/ -5 2)        => -3 1\n(floor/ 5 -2)        => -3 -1\n(floor/ -5 -2)       => 2 -1\n(truncate/ 5 2)      => 2 1\n(truncate/ -5 2)     => -2 -1\n(truncate/ 5 -2)     => -2 1\n(truncate/ -5 -2)    => 2 -1\n(truncate/ -5.0 -2)  => 2.0 -1.0%\n@end lisp" :similar (truncate-quotient truncate/ floor-remainder floor-quotient floor/))

(truncate-quotient :see truncate-remainder)
(truncate/ :see truncate-remainder)
(floor-remainder :see truncate-remainder)
(floor-quotient :see truncate-remainder)
(floor/ :see truncate-remainder)
(square :type r7rs-procedure :synopsis "(square z)" :description "Returns the square of |z|. This is equivalent to |(* z z)|.\n\n@lisp\n(square 42)     => 1764\n(square 2.0)    => 4.0\n@end lisp" :similar ())

(exact-integer-sqrt :type r7rs-procedure :synopsis "(exact-integer-sqrt k)" :description "Returns two non negatives integers |s| and |r| where\n|k=s**2+r| and |k<(s+1)**2|.\n\n@lisp\n(exact-integer-sqrt 4)     => 2 0\n(exact-integer-sqrt 5)     => 2 1\n@end lisp" :similar ())

(inexact :type r7rs-procedure :synopsis "(inexact z)\n(exact z)" :description "These R7RS procedures correspond to the R5RS |exact->inexact|\nand |inexact->exact| procedure respectively" :similar (exact))

(exact :see inexact)
(boolean=? :type procedure :synopsis "(boolean=? boolean1 boolean2  ...)" :description "Returns #t if all the arguments are booleans and all are #t or all are #f.\n" :similar ())

(make-list :type r7rs-procedure :synopsis "(make-list k)\n(make-list k fill)" :description "Returns a newly allocated list of k elements. If a second\nargument is given, then each element is initialized to fill .\nOtherwise the initial contents of each element is unspecified." :similar ())

(symbol=? :type procedure :synopsis "(symbol=? symbol1 symbol2  ...)" :description "Returns #t if all the arguments are symbols and all have the same name in\nthe sense of |string=?|." :similar ())

(string-copy! :type r7rs-procedure :synopsis "(string-copy! to at from)\n(string-copy! to at from start)\n(string-copy! to at from start end)" :description " Copies the characters of |string| from between |start| and |end|\nto string |to|, starting at |at|. The order in which characters are copied\nis unspecified, except that if the source and destination overlap,\ncopying takes place as if the source is first copied into a temporary\nstring and then into the destination. This can be achieved without\nallocating storage by making sure to copy in the correct direction in\nsuch circumstances.\n\nIt is an error if |at| is less than zero or greater than the length\nof |to|. It is also an error if |(- (string-length to) at)| is less\nthan |(- end start)|." :similar ())

(vector-copy! :type r7rs-procedure :synopsis "(vector-copy! to at from)\n(vector-copy! to at from start)\n(vector-copy! to at from start end)" :description "" :similar ())

(string->vector :type r7rs-procedure :synopsis "(vector->string string)\n(vector->string string start)\n(vector->string string start end)\n(string->vector vector)\n(string->vector vector start)\n(string->vector vector start end)" :description "The |vector->string| procedure returns a newly allocated\nstring of the objects contained in the elements of |vector|\nbetween |start| and |end|. It is an error if any element of |vector|\nbetween |start| and |end| is not a character.\n\nThe |string->vector| procedure returns a newly created vector\ninitialized to the elements of |string| between |start| and |end|.\n\nIn both procedures, order is preserved.\n\n@lisp\n(string->vector \"ABC\")           => #(#\\A #\\B #\\C)\n(vector->string #(#\\1 #\\2 #\\3))  => \"123\"\n@end lisp" :similar (vector->string))

(vector->string :see string->vector)
(make-bytevector :type r7rs-procedure :synopsis "(make-bytevector k)\n(make-bytevector k byte)" :description "Returns a newly allocated bytevector of k bytes. If If |byte| is given,\nthen all elements of the bytevector are initialized to |byte|, otherwise\nthe contents of each element is 0.\n@lisp\n(make-bytevector 2 12) => #u8(12 12)\n(make-bytevector 3)    => #u8(0 0 0)\n@end lisp" :similar ())

(bytevector? :type r7rs-procedure :synopsis "(bytevector? obj)" :description "Returns |!t| if |obj| is a bytevector and returns |!f| otherwise." :similar ())

(bytevector :type r7rs-procedure :synopsis "(bytevector byte ...)" :description "Returns a newly allocated bytevector containing its arguments.\n@lisp\n(bytevector 1 3 5 1 3 5)   => #u8(1 3 5 1 3 5)\n(bytevector)               => #u8()\n@end lisp" :similar ())

(bytevector-length :type r7rs-procedure :synopsis "(bytevector-length bytevector)" :description "Returns the length of |bytevector| in bytes as an exact integer." :similar ())

(bytevector-u8-ref :type r7rs-procedure :synopsis "(bytevector-u8-ref bytevector k)" :description "Returns the byte at index |k| of |bytevector| as an exact integer in the\nrange [0..255]. It is an error if |k| is not a valid index of |bytevector|.\n\n@lisp\n(bytevector-u8-ref ’#u8(1 1 2 3 5 8 13 21) 5    => 8\n@end lisp" :similar ())

(bytevector-u8-set! :type extended :synopsis "(bytevector-u8-ref bytevector k byte)" :description "Stores byte as the k th byte of bytevector. It is an error if |k|\nis not a valid index of |bytevector|.\n\n@lisp\n(let ((bv (bytevector 1 2 3 4)))\n  (bytevector-u8-set! bv 1 3)\n  bv)                             => #u8(1 3 3 4)\n@end lisp" :similar ())

(bytevector-copy! :type r7rs-procedure :synopsis "(bytevector-copy! to at from)\n(bytevector-copy! to at from start)\n(bytevector-copy! to at from start end)" :description "Copies the bytes of bytevector |from| between |start| and |end|\nto bytevector |to|, starting at |at|. The order in which bytes\nare copied is unspecified, except that if the source and\ndestination overlap, copying takes place as if the source is first\ncopied into a temporary bytevector and then into the destination.\nThis can be achieved without allocating storage by making sure\nto copy in the correct direction in such circumstances.\n\nIt is an error if |at| is less than zero or greater than the length\nof |to|. It is also an error if |(- (bytevector-length to) at)| is\nless than |(- end start)|.\n\n@lisp\n(define a (bytevector 1 2 3 4 5))\n(define b (bytevector 10 20 30 40 50))\n(bytevector-copy! b 1 a 0 2)\nb                                  =>  #u8(10 1 2 40 50\n@end lisp" :similar ())

(string-map :type r7rs-procedure :synopsis "(string-map proc string1 string2 ...)" :description "The |strings| must be strings, and |proc| must be a procedure taking as\nmany arguments as there are strings and returning a single\nvalue. If more than one string is given and not all strings have the\nsame length, |string-map| terminates when the shortest list runs\nout. |String-map| applies |proc| element-wise to the elements of the\nstrings and returns a string of the results, in order. The dynamic\norder in which proc is applied to the elements of the |strings| is\nunspecified.\n@lisp\n(string-map char-downcase \"AbdEgH\")\n         => \"abdegh\"\n\n(string-map\n  (lambda (c)\n    (integer->char (+ 1 (char->integer c))))\n  \"HAL\")\n         => \"IBM\"\n\n(string-map (lambda (c k)\n           (if (eqv? k #\\u)\n               (char-upcase c)\n               (char-downcase c)))\n         \"studlycaps\"\n         \"ululululul\")\n      => \"StUdLyCaPs\"\n@end lisp\n" :similar ())

(vector-map :type r7rs-procedure :synopsis "(vector-map proc vector1 vector2 ...)" :description "The |vectors| must be vectors, and |proc| must be a procedure\ntaking as many arguments as there are vectors and returning a single\nvalue. If more than one vector is given and not all vectors have the\nsame length, |vector-map| terminates when the shortest list runs\nout. |Vector-map| applies |proc| element-wise to the elements of the\nvectors and returns a vector of the results, in order. The dynamic\norder in which proc is applied to the elements of the |vectors| is\nunspecified.\n@lisp\n(vector-map cadr '#((a b) (d e) (g h)))\n    =>  #(b e h)\n\n(vector-map (lambda (n) (expt n n))\n         '#(1 2 3 4 5))\n    => #(1 4 27 256 3125)\n\n(vector-map + '#(1 2 3) '#(4 5 6))\n    => #(5 7 9)\n\n(let ((count 0))\n  (vector-map\n    (lambda (ignored)\n      (set! count (+ count 1))\n      count)\n    '#(a b)))\n    => #(1 2) or #(2 1)\n@end lisp" :similar ())

(string-for-each :type r7rs-procedure :synopsis "(string-for-each proc string1 string2 ...)" :description "The arguments to |string-for-each| are like the arguments to\n|string-map|, but |string-for-each| calls |proc| for its side effects\nrather than for its values. Unlike |string-map|, |string-for-each| is\nguaranteed to call |proc| on the elements of the lists in order from\nthe first element(s) to the last, and the value returned by\n|string-for-each| is unspecified. If more than one string is given and\nnot all strings have the same length, |string-for-each| terminates when\nthe shortest string runs out.\n@lisp\n(let ((v (list)))\n  (string-for-each (lambda (c) (set! v (cons (char->integer c) v)))\n                   \"abcde\")\n   v)\n       => (101 100 99 98 97)\n@end lisp" :similar ())

(vector-for-each :type r7rs-procedure :synopsis "(vector-for-each proc vector1 vector2 ...)" :description "The arguments to |vector-for-each| are like the arguments to\n|vector-map|, but |vector-for-each| calls |proc| for its side effects\nrather than for its values. Unlike |vector-map|, |vector-for-each| is\nguaranteed to call |proc| on the elements of the lists in order from\nthe first element(s) to the last, and the value returned by\n|vector-for-each| is unspecified. If more than one vector is given and\nnot all vectors have the same length, |vector-for-each| terminates when\nthe shortest vector runs out.\n@lisp\n(let ((v (make-vector 5)))\n  (vector-for-each (lambda (i) (vector-set! v i (* i i)))\n                '#(0 1 2 3 4))\n  v)\n       => #(0 1 4 9 16)\n@end lisp" :similar ())

(error-object? :type r7rs-procedure :synopsis "(error-object? obj )" :description "Returns #t if obj is an object created by error. Otherwise,\nit returns #f." :similar ())

(error-object-message :type r7rs-procedure :synopsis "(error-object-message error-object)" :description "Returns the message encapsulated by |error-object|.\n" :similar ())

(error-object-irritants :type r7rs-procedure :synopsis "(error-object-irritants error-object)" :description "Returns the message encapsulated by |error-object|.\n" :similar ())

(file-error? :type r7rs-procedure :synopsis "(read-error? obj)\n(file-error? obj)" :description "\nError type predicates. Returns #t if |obj| is an object raised\nby the read procedure or by the inability to open an input or\noutput port on a file, respectively. Otherwise, it returns #f.\n" :similar (read-error?))

(read-error? :see file-error?)
(call-with-port :type r7rs-procedure :synopsis "(call-with-port port proc)" :description "The |call-with-port| procedure calls |proc| with |port| as an\nargument. If |proc| returns, then the |port| is closed automatically\nand the values yielded by the |proc| are returned.\nIf |proc| does not return, then the |port| must not be closed\nautomatically unless it is possible to prove that the port\nwill never again be used for a read or write operation.\n\nIt is an error if proc does not accept one argument.\n\nfine (call-with-port port proc)\n;(unless (port? port)\n (error 'call-with-port  \"bad port ~S\" port))\n;(unless (and (procedure? proc) (memq (%procedure-arity proc) '(-2 -1 1)))\n (error 'call-with-port \"bad procedure ~S\" proc))\n%claim-error 'call-with-port\n             (let ((res (call-with-values\n                            (lambda () (proc port))\n                          list)))\n               (close-port port)\n               (apply values res))))\n\n\n\nc R7RS input-port-open? output-port-open?\n(input-port-open? port)\n(output-port-open? port)\n\nReturns #t if port is still open and capable of performing\ninput or output, respectively, and #f otherwise." :similar ())

(read-string :type r7rs-procedure :synopsis "(read-string k)\n(read-string k port)" :description "Reads the next |k| characters, or as many as are available\nbefore the end of file, from the textual input |port| into a\nnewly allocated string in left-to-right order and returns the\nstring. If no characters are available before the end of file,\nan end-of-file object is returned." :similar ())

(read-u8 :type r7rs-procedure :synopsis "(read-u8)\n(read-u8 port)" :description "Returns the next byte available from the binary input |port|,\nupdating the |port| to point to the following byte. If no more\nbytes are available, an end-of-file object is returned.\n\n@l\n,(bold \"Note\"): This function is similar to the |read-byte|\nfunction, excepted that it can be used only on  a binary port." :similar ())

(peek-u8 :type r7rs-procedure :synopsis "(peek-u8)\n(peek-u8 port)" :description "Returns the next byte available from the binary input |port|,\nbut without updating the |port| to point to the following\nbyte. If no more bytes are available, an end-of-file object\nis returned.\n\n@l\n,(bold \"Note\"): This function is similar to the |peek-byte|\nfunction, excepted that it can be used only on  a binary port." :similar ())

(read-bytevector! :type r7rs-procedure :synopsis "(read-bytevector! k)\n(read-bytevector! k port)\n(read-bytevector! k port start)\n(read-bytevector! k port start end)" :description "Reads the next |end - start| bytes, or as many as are available\nbefore the end of file, from the binary input port\ninto |bytevector| in left-to-right order beginning at the start\nposition. If |end| is not supplied, reads until the end of\n|bytevector| has been reached. If |start| is not supplied, reads\nbeginning at position 0. Returns the number of bytes read.\nIf no bytes are available, an end-of-file object is returned." :similar ())

(write-string :type r7rs-procedure :synopsis "(write-string string)\n(write-string string port)\n(write-string string port start)\n(write-string string port start end)" :description "Writes the characters of |string| from |start| to |end| in\nleft-to-right order to the textual output |port|." :similar ())

(write-u8 :type r7rs-procedure :synopsis "(write-u8 byte)\n(write-u8 byte port)" :description "Writes the |byte| to the given binary output port." :similar ())

(write-bytevector :type r7rs-procedure :synopsis "(write-bytevector bytevector)\n(write-bytevector bytevector port)\n(write-bytevector bytevector port start)\n(write-bytevector bytevector port start end)" :description "Writes the bytes of |bytevector| from |start| to |end| in\nleft-to-right order to the binary output |port|." :similar ())

(with-handler :type extended-syntax :synopsis "(with-handler <handler> <expr1> ... <exprn>)" :description "Evaluates the sequences of expressions |<expr1>| to |<exprn>|.\n|<handler>| must be a procedure that accepts one argument. It is installed\nas the current exception handler for the dynamic extent (as determined by\ndynamic-wind) of the evaluations of the expressions\n@lisp\n(with-handler (lambda (c)\n                (display \"Catch an error\\\\n\"))\n   (display \"One ... \")\n   (+ \"will yield\" \"an error\")\n   (display \"... Two\"))\n       @print{} \"One ... Catch an error\"\n@end lisp" :similar ())

(with-exception-handler :type r7rs-procedure :synopsis "(with-exception-handler <handler> <thunk>)" :description "This form is similar to |with-handler|. It uses a ,(emph \"thunk\") instead of\na sequence of expressions. It is conform to ,(link-srfi 34).\nIn fact,\n@lisp\n(with-handler <handler> <expr1> ... <exprn>)\n@end lisp\nis equivalent to\n@lisp\n(with-exception-handler <handler>\n  (lambda () <expr1> ... <exprn>))\n@end lisp" :similar ())

(raise-continuable :type r7rs-procedure :synopsis "(raise-continuable obj)" :description "Raises an exception by invoking the current exception handler on\n|obj|. The handler is called with the same dynamic environment as the\ncall to |raise-continuable|, except that: (1) the current exception\nhandler is the one that was in place when the handler being called was\ninstalled, and (2) if the handler being called returns, then it will again\nbecome the current exception handler.  If the handler returns, the values\nit returns become the values returned by the call to |raise-continuable|.\n@lisp\n(with-exception-handler\n  (lambda (con)\n    (cond\n      ((string? con)\n       (display con))\n      (else\n       (display \"a warning has been issued\")))\n    42)\n  (lambda ()\n    (+ (raise-continuable \"should be a number\")\n       23)))\n  ;; prints should be a number\n                => 65\n@end lisp" :similar ())

(guard :type r7rs-procedure :synopsis "(guard (<var> <clause1 > <clause2 > ...)  <body>)" :description "Evaluating a guard form evaluates |<body>| with an exception handler\nthat binds the raised object to |<var>| and within the scope of that\nbinding evaluates the clauses as if they were the clauses of a cond\nexpression. That implicit cond  expression is evaluated with the\ncontinuation and dynamic environment of the |guard| expression.\nIf every |<clause>|'s test evaluates to false and there is no |else|\nclause, then |raise|  is re-invoked on the raised object within the\ndynamic environment of the original call to |raise| except that the\ncurrent exception handler is that of the |guard| expression.\n\n@lisp\n(guard (condition\n         ((assq 'a condition) =\\> cdr)\n         ((assq 'b condition)))\n  (raise (list (cons 'a 42))))\n         => 42\n\n(guard (condition\n         ((assq 'a condition) =\\> cdr)\n         ((assq 'b condition)))\n  (raise (list (cons 'b 23))))\n         => (b . 23)\n\n(with-handler (lambda (c) (format \"value ~A was raised\" c))\n  (guard (condition\n       ((assq 'a condition) =\\> cdr)\n       ((assq 'b condition)))\n      (raise (list (cons 'x 0)))))\n         => \"value ((x . 0)) was raised\"\n@end lisp" :similar ())

(current-jiffy :type r7rs-procedure :synopsis "(current-jiffy)" :description "Returns the number of ,(emph \"jiffies\") as an exact integer that\nhave elapsed since an arbitrary, implementation-defined\nepoch. A jiffy is an implementation-defined fraction of\na second which is defined by the return value of the\n|jiffies-per-second| procedure. The starting epoch is\nguaranteed to be constant during a run of the program,\nbut may vary between runs." :similar ())

(jiffies-per-second :type r7rs-procedure :synopsis "(jiffies-per-seconds)" :description "Returns an exact integer representing the number of jiffies\nper second.\n\n@lisp\n(define (time-length)\n  (let ((list (make-list 100000))\n        (start (current-jiffy)))\n    (length list)\n    (/ (- (current-jiffy) start)\n       (jiffies-per-second))))\n@end lisp" :similar ())

(features :type r7rs-procedure :synopsis "(features)" :description "Returns a list of the feature identifiers which |cond-expand|\ntreats as true. It is an error to modify this list. Here is an\nexample of what |features| might return:\n\n@lisp\n(features) => (STklos STklos-1.20  almost-r7rs\n               exact-complex ieee-float full-unicode\n               ratios little-endian)\n@end lisp" :similar ())


;; Source file "regexp.stk"

(regexp-replace-all :type extended :synopsis "(regexp-replace pattern string substitution)\n(regexp-replace-all pattern string substitution)" :description "|Regexp-replace| matches the regular expression |pattern| against\n|string|. If there is a match, the portion of |string| which matches\n|pattern| is replaced by the |substitution| string. If there is no\nmatch, |regexp-replace| returns |string| unmodified. Note that the\ngiven |pattern| could be here either a string or a regular expression.\n,(linebreak)\nIf |pattern| contains |\\\\n| where ,(bold \"n\") is a digit between 1 and 9,\nthen it is replaced in the substitution with the portion of string that\nmatched the ,(bold \"n\")-th parenthesized subexpression of |pattern|. If\n,(bold \"n\") is equal to 0, then it is replaced in |substitution|\nwith the portion of |string| that matched |pattern|.\n,(linebreak)\n|Regexp-replace| replaces the first occurrence of |pattern| in |string|.\nTo replace ,(bold \"all\") the occurrences of |pattern|, use |regexp-replace-all|.\n\n@lisp\n(regexp-replace \"a*b\" \"aaabbcccc\" \"X\")\n                   => \"Xbcccc\"\n(regexp-replace (string->regexp \"a*b\") \"aaabbcccc\" \"X\")\n                   => \"Xbcccc\"\n(regexp-replace \"(a*)b\" \"aaabbcccc\" \"X\\\\\\\\1Y\")\n                   => \"XaaaYbcccc\"\n(regexp-replace \"f(.*)r\" \"foobar\" \"\\\\\\\\1 \\\\\\\\1\")\n                   => \"ooba ooba\"\n(regexp-replace \"f(.*)r\" \"foobar\" \"\\\\\\\\0 \\\\\\\\0\")\n                   => \"foobar foobar\"\n\n(regexp-replace \"a*b\" \"aaabbcccc\" \"X\")\n                   => \"Xbcccc\"\n(regexp-replace-all \"a*b\" \"aaabbcccc\" \"X\")\n                   => \"XXcccc\"\n@end lisp" :similar (regexp-replace))

(regexp-replace :see regexp-replace-all)

;; Source file "readline.stk"


;; Source file "repl.stk"

(repl :type extended :synopsis "(repl)\n(repl :in inport :out outport :err errport)" :description "This procedure launches a new Read-Eval-Print-Loop. Calls to |repl| can be\nembedded. The ports used for input/output as well as the error port can\nbe passed when |repl| is called. If not passed, they default to\n|current-input-port|, |current-output-port| and |current-error-port|." :similar ())


;; Source file "repl-readline.stk"


;; Source file "runtime.stk"

(stklos-debug-level :type extended :synopsis "(stklos-debug-level)" :description "|stklos-debug-level| is a parameter objet. It permits to know the current\ndebugging level. The default value of this parameter is 0 (meaning \"no debug\").\nNote that the debugging level can also be set by the |--debug| option of the\n|stklos(1)| command." :similar ())


;; Source file "srfis-data.scm"


;; Source file "srfi-0.stk"

(require-feature :type extended :synopsis "(require-feature feature)" :description "This primitive ensures that the |feature| (in sense of SRFI-0 feature) can be used.\nIn particular, it eventually requires the loading of the files needed to used |feature|.\nThe |feature| can be expressed as a string or a symbol, If feature is an integer |n|,\nit is equivalent to |srfi-n|. Consequently, to use ,(quick-link-srfi 1) \nthe following forms are equivalent:\n\n@lisp\n(require-feature 'srfi-1)\n(require-feature \"srfi-1\")\n(require-feature 1)\n(require-feature 'lists)      ;; Since this feature name is an alias for SRFI-1\n@end lisp\n\nSee also chapter ,(ref :chapter \"SRFIs\") for more information.])" :similar ())


;; Source file "str.stk"


;; Source file "struct.stk"

(define-struct :type extended-syntax :synopsis "(define-struct <name> <slot> ...)" :description "Defines a structure type whose name is |<name>|. Once a structure type is\ndefined, the following symbols are bound:\n,(itemize\n(item [|<name>| denotes the structure type.])\n\n(item [|make-<name>| is a procedure which takes 0 to |n| parameters (if there\nare |n| slots defined). Each parameter is assigned to the corresponding\nfield (in the definition order).])\n\n(item [|<name>?| is a predicate which returns |%t| when applied to an\ninstance of the |<name>| structure type and |%f| otherwise.])\n\n(item [|<name>-<slot>| (one for each defined |<slot>|) to read the\ncontent of an instance of the |<name>| structure type. Writting the\ncontent of a slot can be done using a generalized |set!|.])\n)\n\n@lisp\n(define-struct point x y)\n(define p (make-point 1 2))\n(point? p)    => #t\n(point? 100)  => #f\n(point-x p)   => 1\n(point-y p)   => 2\n(set! (point-x p) 10)\n(point-x p)   => 10\n@end lisp\n" :similar ())


;; Source file "thread.stk"

(make-thread :type extended :synopsis "(make-thread thunk)\n(make-thread thunk name)\n(make-thread thunk name stack-size)" :description "Returns a new thread. This thread is not automatically made runnable\n(the procedure |thread-start!| must be used for this). A thread has the\nfollowing fields:  name, specific, end-result, end-exception, and a list\nof locked/owned mutexes it owns. The thread's execution consists of a call\nto thunk with the \"initial continuation\". This continuation causes the\n(then) current thread to store the result in its end-result field, abandon\nall mutexes it owns, and finally terminate. The dynamic-wind\nstack of the initial continuation is empty. The optional name is an\narbitrary Scheme object which identifies the thread (useful for debugging)\\;\nit defaults to an unspecified value. The specific field is set to an\nunspecified value.  The thread inherits the dynamic environment from the\ncurrent thread. Moreover, in this dynamic environment the exception handler\nis bound to the \"initial exception handler\" which is a unary procedure\nwhich causes the (then) current thread to store in its end-exception\nfield an \"uncaught exception\" object whose \"reason\" is the argument\nof the handler, abandon all mutexes it owns, and finally terminate.\n@l\n,(bold \"Note:\") The optional parameter |stack-size| permits to specify\nthe size (in words) reserved for the thread. This option does not exist\nin ,(quick-link-srfi 18)." :similar ())

(thread-handler-error-show :type extended :synopsis "(thread-handler-error-show)\n(thread-handler-error-show value)" :description "When an untrapped error occurs in a thread, it produces an\n,(ref :mark \"make-thread\" \"uncaught exception\") which can finally be\ntrapped when the thread is ,(ref :mark \"thread-join!\" \"joined\").\nSetting the |thread-handler-error-show| parameter permits to see\nerror message as soon as possible, even without joining the thread.\nThis makes debugging easier. By default, this parameter is set to\n|%t|." :similar ())

(join-timeout-exception? :type extended :synopsis "(join-timeout-exception? obj)" :description "Returns #t if |obj| is a \"join timeout exception\" object, otherwise returns #f.\nA join timeout exception is raised when thread-join! is called, the timeout\nis reached and no timeout-val is supplied." :similar ())

(abandoned-mutex-exception? :type extended :synopsis "(abandoned-mutex-exception? obj)" :description "Returns #t if |obj| is an \"abandoned mutex exception\" object, otherwise returns\n#f. An abandoned mutex exception is raised when the current thread locks\na mutex that was owned by a thread which terminated (see |mutex-lock!|)." :similar ())

(terminated-thread-exception? :type extended :synopsis "(terminated-thread-exception? obj)" :description "Returns #t if |obj| is a \"terminated thread exception\" object, otherwise\nreturns #f. A terminated thread exception is raised when thread-join! is\ncalled and the target thread has terminated as a result of a call to\n|thread-terminate!|." :similar ())

(uncaught-exception? :type extended :synopsis "(uncaught-exception? obj)" :description "Returns #t if |obj| is an \"uncaught exception\" object, otherwise returns\n#f. An uncaught exception is raised when |thread-join!| is called and the\ntarget thread has terminated because it raised an exception that called\nthe initial exception handler of that thread." :similar ())

(uncaught-exception-reason :type extended :synopsis "(uncaught-exception-reason exc)" :description "Returns the object which was passed to the initial exception handler\nof that thread (exc must be an \"uncaught exception\" object)." :similar ())


;; Source file "STklos.init"


;; Source file "bigloo-support.stk"


;; Source file "bigmatch.stk"

(match-lambda :type extended-syntax :synopsis "(match-lambda <clause> ...)" :description "|match-lambda| expands into a lambda-expression expecting an argument\nwhich, once applied to an expression, behaves exactly like a\n|match-case| expression.\n@lisp\n((match-lambda\n  ((?x ?x) 'foo)\n  ((?x ?- ?x) 'bar))\n '(a b a))           => bar\n@end lisp" :similar ())

(match-case :type extended-syntax :synopsis "(match-case <key> <clause> ...)" :description "The argument key may be any expression and each clause has the form\n@lisp\n(<pattern> <expression> ...)\n@end lisp\nA match-case expression is evaluated as follows: |<key>| is evaluated\nand the result is compared with each successive pattern. If the |<pattern>|\nin some clause yields a match, then the |<expression>|s in that clause are\nevaluated from left to right in an environment where the pattern variables\nare bound to the corresponding subparts of |<key>|, and the result of the\nlast expression in that clause is returned as the result of the\n|match-case| expression. If no pattern in any clause matches the |<key>|,\nthen, if there is an |else| clause, its expressions are evaluated and\nthe result of the last is the result of the whole |match-case|\nexpression; otherwise the result of the |match-case| expression\nis unspecified.\n,(linebreak)\nThe equality predicate used for tests is |eq?|.\n@lisp\n(match-case '(a b a)\n   ((?x ?x) 'foo)\n   ((?x ?- ?x) 'bar))   => bar\n\n(match-case '(a (b c) d)\n   ((?x ?y) (list 'length=2 y x))\n   ((?x ?y ?z) (list 'length=3 z y x)))\n                        => (length=3 d (b c) a)\n@end lisp" :similar ())


;; Source file "compfile.stk"


;; Source file "describe.stk"


;; Source file "env.stk"

(interaction-environment :type procedure :synopsis "(interaction-environment)" :description "This procedure returns the environment in the expression are\nevaluated by default (the ,(stklos) module)." :similar ())

(null-environment :type procedure :synopsis "(null-environment)\n(null-environment version)" :description "Returns a specifier for an environment that is empty except for\nthe (syntactic) bindings for all syntactic keywords defined in\nthe R5RS report.\n,(linebreak)\n,(bold \"Note\"): In STklos, |null-environment| function can be called\nwithout the version number (defaults to 5)." :similar ())

(scheme-report-environment :type procedure :synopsis "(scheme-report-environment)\n(scheme-report-environment version)" :description "Returns a specifier for an environment that contains the bindings defined\nin the R5RS report.\n,(linebreak)\n,(bold \"Note\"): In STklos, |scheme-report-environment| function can be called\nwithout the version number (defaults to 5)." :similar ())


;; Source file "expand.ss"


;; Source file "full-syntax.stk"

(let-syntax :type syntax :synopsis "(let-syntax <bindings> <body>)" :description "|<Bindings>| should have the form\n@lisp\n((<keyword> <transformer spec>) ...)\n@end lisp\nEach |<keyword>| is an identifier, each |<transformer spec>| is an instance of\n|syntax-rules|, and |<body>| should be a sequence of one or more expressions.  It\nis an error for a |<keyword>| to appear more than once in the list of keywords\nbeing bound.\n,(linebreak)\nThe |<body>| is expanded in the syntactic environment obtained by\nextending the syntactic environment of the |let-syntax| expression with macros\nwhose keywords are the |<keyword>|s, bound to the specified transformers.  Each\nbinding of a |<keyword>| has |<body>| as its region.\n,(linebreak)\n,(bold \"Note:\") |let-syntax| is available only after having required the file\n|\"full-syntax\"|.\n@lisp\n(let-syntax ((when (syntax-rules ()\n\t\t     ((when test stmt1 stmt2 ...)\n\t\t      (if test\n\t\t\t  (begin stmt1\n\t\t\t\t stmt2 ...))))))\n  (let ((if #t))\n    (when if (set! if 'now))\n    if))                           =>  now\n\n(let ((x 'outer))\n  (let-syntax ((m (syntax-rules () ((m) x))))\n    (let ((x 'inner))\n      (m))))                       =>  outer\n@end lisp" :similar ())

(letrec-syntax :type syntax :synopsis "(letrec-syntax <bindings> <body>)" :description "Syntax of |letrec-syntax| is the same as for |let-syntax|.\n,(linebreak)\nThe |<body>| is expanded in the syntactic environment obtained by\nextending the syntactic environment of the |letrec-syntax| expression\nwith macros whose keywords are the |<keyword>|s, bound to the specified\ntransformers.  Each binding of a |<keyword>| has the |<bindings>| as well\nas the |<body>| within its region, so the transformers can transcribe\nexpressions into uses of the macros introduced by the |letrec-syntax|\nexpression.\n,(linebreak)\n,(bold \"Note:\") |letrec-syntax| is available only after having required the file\n|\"full-syntax\"|.\n\n@lisp\n(letrec-syntax\n  ((my-or (syntax-rules ()\n            ((my-or) #f)\n            ((my-or e) e)\n            ((my-or e1 e2 ...)\n             (let ((temp e1))\n               (if temp\n                   temp\n                   (my-or e2 ...)))))))\n  (let ((x #f)\n        (y 7)\n        (temp 8)\n        (let odd?)\n        (if even?))\n    (my-or x\n           (let temp)\n           (if y)\n           y)))        =>  7\n@end lisp" :similar ())


;; Source file "full-conditions.stk"


;; Source file "getopt.stk"

(arg-usage :type extended :synopsis "(arg-usage port)\n(arg-usage port as-sexpr)" :description "This procedure is only bound inside a |parse-arguments| form.\nIt pretty prints the help associated to the clauses of the\n|parse-arguments| form on the given port. If the argument\n|as-sexpr| is passed and is not| #f|, the help strings are\nprinted on |port| as ,(emph \"S-expr\")s. This is useful if the help\nstrings need to be manipulated by a program.\n" :similar ())

(parse-arguments :type extended :synopsis "(parse-arguments <args> <clause1> <clause2> ...)" :description "The |parse-arguments| special form is used to parse the\ncommand line arguments of a Scheme script. The implementation of\nthis form internally uses the GNU C |getopt| function. As a\nconsequence |parse-arguments| accepts options which start with\nthe '-' (short option) or '--' characters (long option).\n,(linebreak)\nThe first argument of |parse-arguments| is a list of the arguments\ngiven to the program (comprising the program name in the CAR of this\nlist). Following arguments are clauses. Clauses are described later.\n,(linebreak)\nBy  default, |parse-arguments| permutes the contents of (a copy) of\nthe arguments as it scans, so that eventually all the non-options are\nat the end. However, if the shell environment variable |POSIXLY_CORRECT|\nis set, then option processing stops as soon as a non-option argument\nis encountered.\n,(linebreak)\nA clause must follow the syntax:\n,(raw-code [\n<clause>       => string @pipe <list-clause>\n<list clause>  => (<option descr> <expr> ...) @pipe (else <expr> ...)\n<option descr> => (<option name> [<keyword> value]*)\n<option name>  => string\n<keyword>      => :alternate @pipe :arg @pipe :help\n])\n\nA string clause is used to build the  help associated to the command.\nA list clause must follow the syntax describes an option. The |<expr>|s\nassociated to a list clauses are executed when the option is recognized.\nThe |else| clauses is executed when all parameters have been parsed.\nThe |:alternate| key permits to have an alternate name for an option\n(generally a short or long name if the option name is a\nshort or long name).  The |:help| is used to provide help about the\nthe option. The |:arg| is used when the option admit a parameter:\nthe symbol given after |:arg| will be bound to the value of the option\nargument when the corresponding |<expr>|s will be executed.\n,(linebreak)\nIn an |else| clause the symbol |other-arguments| is bound to the\nlist of the arguments which are not options.\n,(linebreak)\nThe following example shows a rather complete usage of the\n|parse-arguments| form\n\n@lisp\n#!/usr/bin/env stklos-script\n\n(define (main args)\n  (parse-arguments args\n     \"Usage: foo [options] [parameter ...]\"\n     \"General options:\"\n       ((\"verbose\" :alternate \"v\" :help \"be more verbose\")\n         (format #t \"Seen the verbose option~%\"))\n       ((\"long\" :help \"a long option alone\")\n         (format #t \"Seen the long option~%\"))\n       ((\"s\" :help \"a short option alone\")\n         (format #t \"Seen the short option~%\"))\n     \"File options:\"\n       ((\"input\" :alternate \"f\" :arg file\n                 :help \"use <file> as input\")\n         (format #t \"Seen the input option with ~S argument~%\" file))\n       ((\"output\" :alternate \"o\" :arg file\n                  :help \"use <file> as output\")\n         (format #t \"Seen the output option with ~S argument~%\" file))\n     \"Misc:\"\n       ((\"help\" :alternate \"h\"\n                :help \"provides help for the command\")\n         (arg-usage (current-error-port))\n         (exit 1))\n       (else\n     (format #t\n             \"All options parsed. Remaining arguments are ~S~%\"\n             other-arguments))))\n@end lisp\n\nThe following program invocation\n@lisp\nfoo -vs --input in -o out arg1 arg2\n@end lisp\n\nproduces the following output\n,(raw-code [\nSeen the verbose option\nSeen the short option\nSeen the input option with \"in\" argument\nSeen the output option with \"out\" argument\nAll options parsed. Remaining arguments are (\"arg1\" \"arg2\")\n])\n\nFinally, the program invocation\n@lisp\nfoo --help\n@end lisp\nproduces the following output\n,(raw-code [\nUsage: foo [options] [parameter ...]\nGeneral options:\n  --verbose, -v               be more verbose\n  --long                      a long option alone\n  -s                          a short option alone\nFile options:\n  --input=<file>, -f <file>   use <file> as input\n  --output=<file>, -o <file>  use <file> as output\nMisc:\n  --help, -h                  provides help for the command\n])\n\n,(bold \"Note:\")\n,(itemize\n(item [Short option can be concatenated. That is,\n@lisp\nprog -abc\n@end lisp\nis equivalent to the following program call\n@lisp\nprog -a -b -c\n@end lisp])\n(item [Any argument following a '--' argument is no more considered as\nan option, even if it starts with a '-' or '--'.])\n(item [Option with a parameter can be written in several ways. For instance\nto set the output in the |bar| file for the previous example can be expressed as\n,(itemize\n(item [|--output=bar|])\n(item [|-o bar|])\n(item [|-obar|]))])\n)" :similar ())


;; Source file "help.stk"

(help :type extended :synopsis "(help obj)\n(help)" :description "When called with an argument, |help| tries to give some help on the\ngiven object, which could be a symbol, a procedure, a generic function\nor a method. Whe called called without arguments, |help| enters a\nread-help-print loop. The documentation for an object is searched in\nthe object itself or, if absent, in STklos documentation.  Inserting\nthe documentation in an objet is very similar to Emacs docstrings: a\ndocumentation string is defined among the code. Exemples of such\nstrings are given below\n@lisp\n(define (foo n)\n  \"If the function body starts with a string, it's a docstring\"\n  (+ n 1))\n\n(define-generic bar\n  :documentation \"Generic function docsting for bar\")\n\n(define-method bar ((x <integer>))\n  \"Probably less useful: as in functions, methods can have docstrings\"\n  (- x 1))\n@end lisp" :similar ())


;; Source file "http.stk"

(http-download :type extended :synopsis "(http-download url dest)" :description "Downloads the contents at |url| using HTTP, and sends the result to\n|dest|, which must be an output port." :similar ())


;; Source file "lex-rt.stk"


;; Source file "make-C-boot.stk"


;; Source file "pretty-print.stk"

(pp :type extended :synopsis "(pretty-print sexpr :key port width)\n(pp sexpr :key port width)" :description "This function tries to obtain a pretty-printed representation of |sexpr|.\nThe pretty-printed form is written on |port| with lines which are no\nmore long than |width| characters. If |port| is omitted if defaults to\nthe current error port. As a special convention, if |port| is |%t|,\noutput goes to the current output port and if |port| is |%f|, the output\nis returned as a string by |pretty-print|.\nNote that |pp| is another name for |pretty-print|.\n" :similar (pretty-print))

(pretty-print :see pp)

;; Source file "recette.stk"


;; Source file "slib.stk"


;; Source file "streams-primitive.stk"


;; Source file "streams-derived.stk"


;; Source file "srfi-1.stk"


;; Source file "srfi-2.stk"


;; Source file "srfi-4.stk"


;; Source file "srfi-5.stk"


;; Source file "srfi-7.stk"


;; Source file "srfi-9.stk"


;; Source file "srfi-11.stk"


;; Source file "srfi-13.stk"


;; Source file "srfi-14.stk"


;; Source file "srfi-17.stk"


;; Source file "srfi-26.stk"


;; Source file "srfi-29.stk"


;; Source file "srfi-31.stk"


;; Source file "srfi-35.stk"


;; Source file "srfi-36.stk"


;; Source file "srfi-37.stk"


;; Source file "srfi-41.stk"


;; Source file "srfi-48.stk"


;; Source file "srfi-51.stk"


;; Source file "srfi-54.stk"


;; Source file "srfi-59.stk"


;; Source file "srfi-60.stk"


;; Source file "srfi-61.stk"


;; Source file "srfi-64.stk"


;; Source file "srfi-66.stk"


;; Source file "srfi-69.stk"


;; Source file "srfi-70.stk"


;; Source file "srfi-74.stk"


;; Source file "srfi-89.stk"


;; Source file "srfi-94.stk"


;; Source file "srfi-96.stk"


;; Source file "srfi-100.stk"


;; Source file "srfi-113.stk"


;; Source file "srfi-117.stk"


;; Source file "srfi-127.stk"


;; Source file "srfi-128.stk"


;; Source file "srfi-129.stk"


;; Source file "srfi-130.stk"


;; Source file "srfi-134.stk"


;; Source file "srfi-135.stk"


;; Source file "srfi-137.stk"


;; Source file "srfi-141.stk"


;; Source file "srfi-151.stk"


;; Source file "srfi-156.stk"


;; Source file "srfi-158.stk"


;; Source file "srfi-161.stk"


;; Source file "srfi-171.stk"


;; Source file "srfi-173.stk"


;; Source file "srfi-174.stk"


;; Source file "srfi-180.stk"


;; Source file "srfi-185.stk"


;; Source file "srfi-189.stk"


;; Source file "srfi-190.stk"


;; Source file "srfi-196.stk"


;; Source file "srfi-207.stk"


;; Source file "srfi-214.stk"


;; Source file "srfi-216.stk"


;; Source file "srfi-217.stk"


;; Source file "srfi-223.stk"


;; Source file "trie.stk"


;; Source file "tar.stk"


;; Source file "trace.stk"

(trace :type extended-syntax :synopsis "(trace f-name ...)" :description "Invoking |trace| with one or more function names causes the functions\nnamed to be traced. Henceforth, whenever such a function is invoked,\ninformation about the call and the returned values, if any, will be\nprinted on the current error port.\n\nCalling |trace| with no argument returns the list of traced functions." :similar ())

(untrace :type extended-syntax :synopsis "(untrace f-name ...)" :description "Invoking |untrace| with one or more function names causes the functions\nnamed not to be traced anymore.\n\nCalling |untrace| with no argument will untrace all the functions\ncurrently traced." :similar ())

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:40 2023


;; Source file "srfi-25.c"

(shape? :type extended :synopsis "(shape? obj)" :description "Checks if |obj| is an array shape. SRFI-25 dictates that a\nshape is an ordinary array, with rank two and shape |(0 r 0 2)|,\nwhere |r| is the rank of the array that the shape describes.\nSo, any array of shape |(0 r 0 2| is a shape, for any non-negative\ninteger |r|." :similar ())

(shared-array? :type extended :synopsis "(shared-array? array)" :description "Will return ,(code \"#t\") when the array has its data shared with other\narrays, and ,(code \"#f\") otherwise." :similar ())

(array-share-count :type extended :synopsis "(array-share-count array)" :description "Returns the number of arrays that were built sharing |array|'s\nelements through |(share-array array shape proc)|, and that were not\nyet garbage collected.\nNote that it may take a long time for an object to be garbage\ncollected automatically. It is possible to force a garbage\ncollection pass by calling |(gc)|, but even that does not guarantee that\na specific object will be collected." :similar ())

(array-shape :type extended :synopsis "(array-shape array)" :description "Returns the shape of |array|." :similar ())

(array-size :type extended :synopsis "(array-size array)" :description "Returns the number of elements in |array|." :similar ())

(array-copy+share :type extended :synopsis "(array-copy+share array)" :description "Returns a copy of |array|.\nIf array does not have its own internal data, but was built using\nshare-array, then the new array will be similar -- it will be a copy of\narray, sharing the elements in the same way." :similar ())

(shape-for-each :type extended :synopsis "(shape-for-each shape proc [index-object])" :description "This procedure will apply proc to all valid sequences of\nindices in |shape|, in row-major order.\n\nIf |index-object| is not provided, then |proc| must accept\nas many arguments as the number of dimensions that the shape\ndescribes.\n@lisp\n(shape-for-each (shape 1 3 10 12)\n                (lambda (x y)\n                  (format #t \"\\[~a ~a\\]~%\" x y)))\n\\[1 10\\]\n\\[1 11\\]\n\\[2 10\\]\n\\[2 11\\]\n@end lisp\nIf |index-object| is provided, it is used as a place to store the\nindices, so proc must accept either a vector or an array (this is to\navoid pushing and popping too many values when calling |proc|).\n|index-object|, when present, must be aither a vector or array.\n@lisp\n(let ((vec (make-vector 2 #f)))\n  (shape-for-each (shape 1 3 10 12)\n                  (lambda (o)\n                    (format #t \"\\[~a ~a\\]~%\"\n                    (vector-ref o 0)\n                    (vector-ref o 1)))\n                  vec))\n\\[1 10\\]\n\\[1 11\\]\n\\[2 10\\]\n\\[2 11\\]\n\n(let ((arr (make-array (shape 0 2))))\n  (shape-for-each (shape 1 3 10 12)\n                  (lambda (o)\n                    (format #t \"\\[~a ~a\\]~%\"\n                    (array-ref o 0)\n                    (array-ref o 1)))\n                  arr))\n\\[1 10\\]\n\\[1 11\\]\n\\[2 10\\]\n\\[2 11\\]\n@end lisp" :similar ())


;; Source file "srfi-25.stk"

(array-length :type extended :synopsis "(array-length array dim)" :description "Returns the length of dimension |dim| in array |array|." :similar ())

(array-for-each-index :type extended :synopsis "(array-for-each-index arr proc [index-object])" :description "Will loop through all valid indices of |array|, applying |proc|\nto those indices.\n\nIf |index-object| is not provided, then |proc| must accept\nas many arguments as the number of dimensions that the shape\ndescribes.\n\nIf |index-object| is provided, it is used as a place to store the\nindices, so |proc| must accept a vector or an array (this is to avoid\npushing and popping too many values when calling proc).\n|index-object|, when present, must be aither a vector or array.\n\nSee the documentation of |shape-for-each| for more information\non |index-object|." :similar ())

(array->vector :type extended :synopsis "(array->vector array)" :description "Returns a vector that contains a copy of the elements of |array|,\nin row-major order. The new vector does not share elements with\nthe original array (it is a fresh copy).\nThis is not recursive, and will not flatten the array." :similar ())

(array->list :type extended :synopsis "(array->list array)" :description "Returns a list that contains a copy of the elements of |array|,\nin row-major order.\nThis is not recursive, and will not flatten the array." :similar ())

(array-map! :type extended :synopsis "(array-map! array [shape] proc arr0 arr1 ...)" :description "For each valid index |idx|, applies proc to the corresponding\nposition in |arr0|, |arr1|, ...  and then sets the same\nplace in |array| to the result.\n\nIf |shape| is specified, it should specify a subarray of\n|array|, and only that section will be mapped." :similar ())

(array-map :type extended :synopsis "(array-map [shape] proc arr0 arr1 ...)" :description "This procedure is similar to |map| for lists:\nit will run |proc| on an element of each of the\n|arr0|, |arr1|, ... arguments, storing the result in\nthe equivalent position of a newly created array.\n\nThe shapes of the arrays must be the same.\n\nThe procedure will create a new array with shape |shape|\n(or |arr0|'s shape, if |shape| was not specified)." :similar ())

(array-copy :type extended :synopsis "(array-copy array)" :description "Returns a copy of |array|.\nThe new copy will have no data shared with any other array, even if the\nargument |array| did." :similar ())

(tabulate-array :type extended :synopsis "(tabulate-array shape proc)\n(tabulate-array shape proc idx)" :description "Returns a new array of shape |shape|, populated according\nto |proc|. Each valid index in |shape| is passed to |proc|,\nand the result is place in the according array position.\n\n|idx| is an object that may be used to store the indices, and\nit may be either a vector or an array. If it is not present, or\nif it is ,(code \"#f\"), then an index vector will be created internally.\n" :similar ())

(array-retabulate! :type extended :synopsis "(array-retabulate! arr shp proc [index-object])" :description "Sets the elements of |arr| in |shape| to the value of |proc| at that\nindex, using |index-object| if provided. This is similar to\n|tabulate-array!|, except that the array is given by the user.\n\n@lisp\n(define arr (array (shape 0 2 0 2) 'a 'b 'c 'd))\n(array-retabulate! arr (shape 0 2 0 2) (lambda (x y) (+ 1 x y)))\narr => #,\\(<array> (0 2 0 2) 1 2 2 3)\n@end lisp" :similar ())

(share-row :type extended :synopsis "(share-row arr k)" :description "Shares whatever the first index is about. The result has one dimension less.\n\n@lisp\n(define a (array (shape 0 2 0 2 0 2) -1 -2 -3 -4 -5 -6 -7 -8))\n\n(share-row a 0) => #,\\(<array> (0 2 0 2) -1 -2 -3 -4)\n(share-row a 1) => #,\\(<array> (0 2 0 2) -5 -6 -7 -8)\n@end lisp" :similar ())

(share-column :type extended :synopsis "(share-column arr k)" :description "Shares whatever the second index is about. The result has one dimension less.\n\n@lisp\n(define a (array (shape 0 2 0 2 0 2) -1 -2 -3 -4 -5 -6 -7 -8))\n\n(share-column a 1) => #,\\(<array> (0 2 0 2) -3 -4 -7 -8)\n(share-column a 0) => #,\\(<array> (0 2 0 2) -1 -2 -5 -6)\n@end lisp" :similar ())

(share-array/origin :type extended :synopsis "(share-array/origin arr k ...)\n(share-array/origin arr index)" :description "change the origin of |arr| to |k| ..., with |index| a vector or zero-based\none-dimensional array that contains k ...\n\n@lisp\n(define a (array (shape 0 2 0 2 ) -1 -2 -3 -4))\n\n(share-array/origin  a 1 1) => #,\\(<array> (1 3 1 3) -1 -2 -3 -4)\n@end lisp" :similar ())

(array-append :type extended :synopsis "(array-append dim arr1 arr2 ...)" :description "Appends arrays |arr1|, |arr2|, ... along the specified dimension |dim|.\nThe arrays must have equally many dimensions and all other dimensions\nequally long.\n\n@lisp\n(define a (array (shape 0 2 0 3) 11 22 33 44 55 66))\n(define b (array (shape 0 3 0 3) -11 -22 -33 -44 -55 -66 -77 -88 -99))\n(define c (array (shape 0 1 0 3) 'a 'b 'c))\n\n(array-append 0 a b c) =>  #,\\(<array> (0 6 0 3)\n                                      11  22  33\n                                      44  55  66\n                                     -11 -22 -33\n                                     -44 -55 -66\n                                     -77 -88 -99\n                                       a   b   c)\n@end lisp" :similar ())

(transpose :type extended :synopsis "(transpose arr k ...)" :description "Shares |arr| with permuted dimensions. Each dimension from 0\ninclusive to rank exclusive must appear once in |k| ...\n\nThis is a generalized transpose. It can permute the dimensions any which\nway. The permutation is provided by a permutation matrix: a square matrix\nof zeros and ones, with exactly one one in each row and column, or a\npermutation of the rows of an identity matrix; the size of the matrix\nmust match the number of dimensions of the array.\n\nThe default permutation is |[ 0 1 , 1 0 ]| of course, but any permutation\narray can be specified, and the shape array of the original array is then\nmultiplied with it, and index column vectors of the new array with its\ninverse, from left, to permute the rows appropriately.\n@lisp\n(transpose (array (shape 0 4 0 4)\n                  -1  -2   -3  -4\n                  -5  -6   -7  -8\n                  -9  -10 -11 -12\n                  -13 -14 -15 -16))\n => #,\\(<array> (0 4 0 4)\n              -1 -5  -9 -13\n              -2 -6 -10 -14\n              -3 -7 -11 -15\n              -4 -8 -12 -16)\n\n(transpose (array (shape 0 3 0 3 0 2)\n                  -1 -2\n                  -3 -4\n                  -5 -6\n\n                  -7 -8\n                  -9 -10\n                  -11 -12\n\n                  -13 -14\n                  -15 -16\n                  -17 -18))\n => #,\\(<array> (0 2 0 3 0 3)\n              -1  -7 -13\n              -3  -9 -15\n              -5 -11 -17\n\n              -2  -8 -14\n              -4 -10 -16\n              -6 -12 -18)\n@end lisp" :similar ())

(share-nths :type extended :synopsis "(share-nths a d n)" :description "|Share-nths| takes every |n|th slice along dimension |d| into a shared array.\nThis preserves the origin.\n\n@lisp\n(define a (array (shape 0 4 0 4)\n                 -1 -2 -3 -4\n                 -5 -6 -7 -8\n                 -9 -10 -11 -12\n                 -13 -14 -15 -16))\n\n(share-nths a 0 2)\n => #,\\(<array> (0 2 0 4) -1  -2  -3  -4\n                        -9 -10 -11 -12)\n\n(share-nths a 1 2)\n => #,\\(<array> (0 4 0 2) -1  -3  -5  -7\n                        -9 -11 -13 -15)\n@end lisp" :similar ())

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:40 2023


;; Source file "srfi-27.c"


;; Source file "srfi-27.stk"

(random-integer :type extended :synopsis "(random-integer n)" :description "Return an integer in the range \\[0, ..., |n|\\[.  Subsequent results of\nthis procedure appear to be independent uniformly distributed over\nthe range \\[0, ..., |n|\\[. The argument |n| must be a positive integer,\notherwise an error is signaled. This function is equivalent to the eponym\nfunction of SRFI-27 (see ,(link-srfi 27) definition for more details)." :similar ())

(random-real :type extended :synopsis "(random-real)" :description "Return a real number |r| such that |0 < r < 1|.\nSubsequent results of this procedure appear to be independent uniformly\ndistributed. This function is equivalent to the eponym\nfunction of SRFI-27 (see ,(link-srfi 27) definition for more details)." :similar ())

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:40 2023


;; Source file "srfi-132.c"


;; Source file "srfi-132.stk"

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:40 2023


;; Source file "srfi-133.c"


;; Source file "srfi-133.stk"

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:40 2023


;; Source file "srfi-144.c"


;; Source file "srfi-144.stk"

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:41 2023


;; Source file "srfi-170.c"


;; Source file "srfi-170.stk"

;; **DO NOT EDIT**			-*- scheme -*-
;; File generated automatically on Fri Mar 17 23:02:41 2023


;; Source file "srfi-175.c"


;; Source file "srfi-175.stk"

