├── .gitignore ├── ABOUT ├── CHANGES ├── LICENSE ├── MASCOT.png ├── Makefile ├── README.md ├── TODO ├── _checksums ├── config.scm ├── configure ├── contrib ├── S9Book ├── S9Book-bw ├── c2html.scm ├── ccode.css ├── draw-tree.scm ├── format-test.scm ├── format.scm ├── format.txt ├── help.scm ├── pretty-print.scm ├── prolog-test.scm ├── prolog.scm ├── queens.scm ├── s9e-config ├── s9e.help ├── s9e.scm ├── s9sos.scm ├── s9sos.txt ├── scheme.css ├── scm2html.scm ├── string-locate.scm └── zebra.scm ├── ext ├── append-to-output-file.scm ├── basename.scm ├── curses.c ├── curses.scm ├── dirname.scm ├── find-help-path.scm ├── find-help.scm ├── flush-output-port.scm ├── format-time.scm ├── get-line.scm ├── inet-server.scm ├── leap-yearp.scm ├── mode-to-string.scm ├── parse-optionsb.scm ├── proper-timep.scm ├── runtime-stats.scm ├── search-path.scm ├── spawn-command.scm ├── spawn-shell-command.scm ├── standard-error.scm ├── time-ops.scm ├── time-to-unix-time.scm ├── time.scm ├── unix-time-to-time.scm ├── unix-tools.scm ├── unix.c └── unix.scm ├── help ├── abs ├── accept-keywords ├── acos ├── adjoin ├── alist-to-hash-table ├── amb ├── amb-collector ├── amb-donep ├── amb-reset ├── and ├── and-letstar ├── append ├── append-streams ├── append-to-output-file ├── appendb ├── apply ├── apropos ├── argv ├── array ├── array-dimensions ├── array-map ├── array-rank ├── array-ref ├── array-setb ├── arrayp ├── asin ├── assert-record-type ├── assoc ├── assp ├── assq ├── assv ├── atan ├── basename ├── begin ├── binary-string-to-integer ├── bit-op ├── bit0 ├── bit1 ├── bita ├── bitb ├── bitca ├── bitcb ├── bitcplus ├── bitcstar ├── biteq ├── bitneq ├── bitnplus ├── bitnstar ├── bitplus ├── bitplusc ├── bitsl ├── bitsr ├── bitstar ├── bitstarc ├── bitwise-1 ├── bitwise-2 ├── bitwise-and ├── bitwise-and-c1 ├── bitwise-and-c2 ├── bitwise-and-not ├── bitwise-c1 ├── bitwise-c2 ├── bitwise-clear ├── bitwise-or ├── bitwise-or-c1 ├── bitwise-or-c2 ├── bitwise-or-not ├── bitwise-set ├── bitwise-shift-left ├── bitwise-shift-right ├── bitwise-xor ├── bitwise-xor-not ├── booleanp ├── c2html ├── caaaar ├── caaadr ├── caaar ├── caadar ├── caaddr ├── caadr ├── caar ├── cadaar ├── cadadr ├── cadar ├── caddar ├── cadddr ├── caddr ├── cadr ├── call-next-method ├── call-with-current-continuation ├── call-with-input-file ├── call-with-output-file ├── call-with-stderr ├── callslashcc ├── canvas-draw ├── canvas-draw-string ├── canvas-dump ├── canvas-plot ├── canvas-plot-line ├── car ├── case ├── catch ├── cdaaar ├── cdaadr ├── cdaar ├── cdadar ├── cdaddr ├── cdadr ├── cdar ├── cddaar ├── cddadr ├── cddar ├── cdddar ├── cddddr ├── cdddr ├── cddr ├── cdr ├── ceiling ├── char-alphabeticp ├── char-cieqp ├── char-cigep ├── char-cigtp ├── char-cilep ├── char-ciltp ├── char-downcase ├── char-lower-casep ├── char-numericp ├── char-plot ├── char-readyp ├── char-to-integer ├── char-upcase ├── char-upper-casep ├── char-whitespacep ├── chareqp ├── chargep ├── chargtp ├── charlep ├── charltp ├── charp ├── choose ├── class-of ├── classp ├── close-input-port ├── close-output-port ├── collect ├── combine ├── combinestar ├── complement ├── compose ├── cond ├── cond-expand ├── cons ├── const ├── cos ├── count ├── current-input-port ├── current-output-port ├── curry ├── curryr ├── curs_addch ├── curs_addstr ├── curs_attroff ├── curs_attron ├── curs_attrset ├── curs_beep ├── curs_cbreak ├── curs_clear ├── curs_clearok ├── curs_clrtobot ├── curs_clrtoeol ├── curs_color-set ├── curs_cols ├── curs_cursoff ├── curs_curson ├── curs_delch ├── curs_deleteln ├── curs_echo ├── curs_endwin ├── curs_flash ├── curs_flushinp ├── curs_get-magic-value ├── curs_getch ├── curs_getyx ├── curs_has-colors ├── curs_idlok ├── curs_inch ├── curs_initscr ├── curs_insch ├── curs_insertln ├── curs_keypad ├── curs_lines ├── curs_move ├── curs_mvaddch ├── curs_mvaddstr ├── curs_mvcur ├── curs_mvdelch ├── curs_mvgetch ├── curs_mvinch ├── curs_mvinsch ├── curs_nl ├── curs_nocbreak ├── curs_nodelay ├── curs_noecho ├── curs_nonl ├── curs_noraw ├── curs_raw ├── curs_refresh ├── curs_resetty ├── curs_savetty ├── curs_scroll ├── curs_scrollok ├── curs_standend ├── curs_standout ├── curs_unctrl ├── curs_ungetch ├── data-structures ├── decb ├── define ├── define-class ├── define-generic ├── define-matcher ├── define-memoizing ├── define-method ├── define-structure ├── define-syntax ├── delay ├── delete-file ├── depth ├── dirname ├── display ├── display-to-string ├── display-usage ├── displaystar ├── do ├── draw-tree ├── dt ├── dump-image ├── duplicates ├── dupp ├── dupq ├── dupv ├── environ ├── eof-objectp ├── eq ├── eqp ├── equal-cip ├── equalp ├── eqvp ├── error ├── evenp ├── exact-to-inexact ├── exactp ├── exists ├── exp ├── explode ├── exponent ├── expt ├── factb ├── factor ├── factorial ├── false ├── file-existsp ├── filter ├── filter-stream ├── find-help ├── find-help-path ├── flatten ├── floor ├── fluid-let ├── flush-output-port ├── fold-left ├── fold-right ├── for-all ├── for-each ├── force ├── fork ├── format ├── format-time ├── gcd ├── ge ├── gensym ├── get-line ├── get-prop ├── go ├── graph-tools ├── group ├── gt ├── hash-table-length ├── hash-table-ref ├── hash-table-removeb ├── hash-table-setb ├── hash-table-to-alist ├── help ├── htmlify-char ├── htmlify-string ├── hyper ├── id ├── if ├── implode ├── incb ├── inet-server ├── inexact-to-exact ├── inexactp ├── initialize ├── input-portp ├── instancep ├── integer-sqrt ├── integer-to-binary-string ├── integer-to-char ├── integerp ├── intersection ├── iota ├── iotastar ├── keyword-value ├── lambda ├── lcm ├── le ├── leap-yearp ├── length ├── let ├── let-matcher ├── letrec ├── letrecstar ├── letslashcc ├── letstar ├── list ├── list-copy ├── list-ref ├── list-tail ├── list-to-record ├── list-to-set ├── list-to-stream ├── list-to-string ├── list-to-vector ├── listp ├── listq ├── load ├── load-from-library ├── locate-file ├── log ├── loutify-char ├── loutify-string ├── lt ├── macro-expand ├── macro-expand-1 ├── make-array ├── make-canvas ├── make-hash-table ├── make-instance ├── make-matcher ├── make-partitions ├── make-queue ├── make-rbt ├── make-stream ├── make-string ├── make-vector ├── mantissa ├── map ├── map-stream ├── max ├── member ├── memoize ├── memp ├── memq ├── memv ├── merge ├── mergesort ├── min ├── minus ├── mode-to-string ├── module ├── modulo ├── name-to-file-name ├── nase ├── negativep ├── new-databaseb ├── newline ├── not ├── nullp ├── number-of-bits ├── number-to-string ├── numberp ├── oddp ├── open-input-file ├── open-output-file ├── opt-argp ├── opt-char ├── opt-type ├── opt-val ├── option ├── or ├── output-portp ├── package ├── pairp ├── parse-optionsb ├── partition ├── peek-char ├── permute ├── permutestar ├── plus ├── popb ├── position ├── positivep ├── posp ├── posq ├── posv ├── pp ├── pp-file ├── pp-loop ├── pp-string ├── predicateb ├── pretty-print ├── print ├── procedurep ├── programp ├── prolog ├── proper-timep ├── pushb ├── put-prop ├── put-propb ├── quasiquote ├── queens ├── query ├── queue ├── queue-emptyp ├── queueb ├── quicksort ├── quote ├── quotient ├── r4rs-procedures ├── r4rs-syntax-objects ├── random ├── random-sort ├── random-state ├── rbt-find ├── rbt-insert ├── rbt-rebuild ├── rbt-remove ├── re-comp ├── re-match ├── re-subst ├── read ├── read-char ├── read-file ├── read-from-string ├── read-line ├── record ├── record-copy ├── record-equalp ├── record-ref ├── record-setb ├── record-signature ├── record-to-list ├── record-type-matches ├── recordp ├── rem-prop ├── rem-propb ├── remainder ├── remove ├── remp ├── remq ├── remv ├── replace ├── reverse ├── reverseb ├── round ├── runstar ├── runtime-stats ├── s9e ├── s9fes-extension-procedures ├── s9fes-extension-symbols ├── s9fes-procedures ├── s9fes-syntax-objects ├── scm2html ├── search-path ├── set-carb ├── set-cdrb ├── set-difference ├── set-input-portb ├── set-output-portb ├── set-varsb ├── setb ├── sieve ├── sin ├── slash ├── slot-ref ├── slot-setb ├── sort ├── spawn-command ├── spawn-command_fd ├── spawn-shell-command ├── spawn-shell-command_fd ├── split ├── split-url ├── sqrt ├── standard-error-port ├── star ├── starextensionsstar ├── starlibrary-pathstar ├── starloadingstar ├── starstar ├── stats ├── stream-any ├── stream-eosp ├── stream-extract ├── stream-id ├── stream-iota ├── stream-member ├── stream-next ├── stream-none ├── stream-to-list ├── stream-value ├── string ├── string-append ├── string-ci-find ├── string-ci-find-last ├── string-ci-find-last-word ├── string-ci-find-word ├── string-ci-last-position ├── string-ci-last-word-position ├── string-ci-locate ├── string-ci-position ├── string-ci-scan ├── string-ci-word-position ├── string-cieqp ├── string-cigep ├── string-cigtp ├── string-cilep ├── string-ciltp ├── string-copy ├── string-digest ├── string-downcase ├── string-expand ├── string-fillb ├── string-find ├── string-find-last ├── string-find-last-word ├── string-find-word ├── string-last-position ├── string-last-word-position ├── string-length ├── string-locate ├── string-map ├── string-mapb ├── string-parse ├── string-position ├── string-prefix-cieqp ├── string-prefixeqp ├── string-ref ├── string-reverse ├── string-scan ├── string-setb ├── string-split ├── string-to-list ├── string-to-number ├── string-to-symbol ├── string-translate ├── string-unsplit ├── string-upcase ├── string-word-position ├── stringeqp ├── stringgep ├── stringgtp ├── stringlep ├── stringltp ├── stringp ├── subarray ├── sublist ├── subsetp ├── substitute ├── substring ├── subvector ├── sum ├── swapb ├── symbol-to-string ├── symbolp ├── symbols ├── syntax-extensions ├── syntax-rules ├── sys_access ├── sys_catch-errors ├── sys_change_mode ├── sys_chdir ├── sys_chmod ├── sys_chown ├── sys_close ├── sys_command-line ├── sys_creat ├── sys_dup ├── sys_dup2 ├── sys_errno ├── sys_execv ├── sys_exit ├── sys_fileno ├── sys_flush ├── sys_fork ├── sys_get-magic-value ├── sys_getcwd ├── sys_getenv ├── sys_getgid ├── sys_getgrgid ├── sys_getgrnam ├── sys_getpgid ├── sys_getpid ├── sys_getpwent ├── sys_getpwnam ├── sys_getpwuid ├── sys_gettimeofday ├── sys_getuid ├── sys_group-gid ├── sys_group-name ├── sys_inet-accept ├── sys_inet-connect ├── sys_inet-getpeername ├── sys_inet-listen ├── sys_kill ├── sys_link ├── sys_lock ├── sys_lseek ├── sys_lstat ├── sys_lstat-atime ├── sys_lstat-block-devp ├── sys_lstat-char-devp ├── sys_lstat-ctime ├── sys_lstat-dev ├── sys_lstat-directoryp ├── sys_lstat-gid ├── sys_lstat-ino ├── sys_lstat-mode ├── sys_lstat-mtime ├── sys_lstat-name ├── sys_lstat-nlink ├── sys_lstat-pipep ├── sys_lstat-regularp ├── sys_lstat-size ├── sys_lstat-socketp ├── sys_lstat-symlinkp ├── sys_lstat-uid ├── sys_make-input-port ├── sys_make-output-port ├── sys_mkdir ├── sys_notify ├── sys_open ├── sys_pipe ├── sys_read ├── sys_readdir ├── sys_readlink ├── sys_rename ├── sys_rmdir ├── sys_select ├── sys_setgid ├── sys_setpgid ├── sys_setuid ├── sys_sleep ├── sys_stat ├── sys_stat-atime ├── sys_stat-block-devp ├── sys_stat-char-devp ├── sys_stat-ctime ├── sys_stat-dev ├── sys_stat-directoryp ├── sys_stat-gid ├── sys_stat-ino ├── sys_stat-mode ├── sys_stat-mtime ├── sys_stat-name ├── sys_stat-nlink ├── sys_stat-pipep ├── sys_stat-regularp ├── sys_stat-size ├── sys_stat-socketp ├── sys_stat-uid ├── sys_strerror ├── sys_symlink ├── sys_system ├── sys_time ├── sys_umask ├── sys_unlink ├── sys_unlock ├── sys_user-gecos ├── sys_user-gid ├── sys_user-home ├── sys_user-name ├── sys_user-shell ├── sys_user-uid ├── sys_usleep ├── sys_utimes ├── sys_wait ├── sys_waitpid ├── sys_write ├── system ├── t-sort ├── t-sort-net ├── tagbody ├── take ├── tan ├── thread-create ├── thread-exit ├── thread-start ├── thread-yield ├── throw ├── time ├── time-add ├── time-afterp ├── time-beforep ├── time-difference ├── time-subtract ├── time-to-unix-time ├── timestar ├── trace ├── transpose ├── tree-copy ├── tree-equalp ├── tree-map ├── true ├── truncate ├── type-case ├── type-of ├── undefined ├── union ├── unix-time-to-time ├── unless ├── unqueue ├── unqueueb ├── unqueuestar ├── unquote ├── unquote-splicing ├── unsort ├── until ├── url-anchor ├── url-args ├── url-decode ├── url-host ├── url-path ├── url-proto ├── url-suffix ├── using ├── vector ├── vector-append ├── vector-copy ├── vector-fillb ├── vector-length ├── vector-map ├── vector-mapb ├── vector-ref ├── vector-setb ├── vector-to-list ├── vectorp ├── void ├── when ├── while ├── with-input-from-file ├── with-output-to-file ├── with-output-to-stderr ├── write ├── write-char ├── write-to-string ├── zebra └── zerop ├── lib ├── _template ├── adjoin.scm ├── amb.scm ├── amk.scm ├── and-letstar.scm ├── appendb.scm ├── array.scm ├── assp.scm ├── bitops.scm ├── bitwise-ops.scm ├── catch.scm ├── char-canvas.scm ├── char-plot.scm ├── choose.scm ├── collect.scm ├── combine.scm ├── cond-expand.scm ├── count.scm ├── data-structures.scm ├── define-structure.scm ├── depth.scm ├── displaystar.scm ├── duplicates.scm ├── equal-cip.scm ├── exists.scm ├── explode.scm ├── factor.scm ├── factorial.scm ├── filter.scm ├── flatten.scm ├── fluid-let-sr.scm ├── fluid-let.scm ├── for-all.scm ├── get-prop.scm ├── graph-tools.scm ├── group.scm ├── hash-table.scm ├── hof.scm ├── htmlify-char.scm ├── hyper.scm ├── id.scm ├── implode.scm ├── integer-sqrt.scm ├── integer-to-binary-string.scm ├── intersection.scm ├── io-tools.scm ├── iota.scm ├── keyword-value.scm ├── letcc.scm ├── letrecstar.scm ├── list-copy.scm ├── list-to-set.scm ├── list-tools.scm ├── listq.scm ├── loutify-char.scm ├── make-partitions.scm ├── matcher.scm ├── math-tools.scm ├── memoize.scm ├── memp.scm ├── merge.scm ├── mergesort.scm ├── name-to-file-name.scm ├── package.scm ├── partition.scm ├── permute.scm ├── position.scm ├── programp.scm ├── queue.scm ├── quicksort.scm ├── random-sort.scm ├── random.scm ├── rb-tree.scm ├── read-file.scm ├── read-from-string.scm ├── read-line.scm ├── records.scm ├── regex.scm ├── remove.scm ├── replace.scm ├── set-difference.scm ├── set-tools.scm ├── setters.scm ├── sieve.scm ├── simple-modules.scm ├── sort.scm ├── split-url.scm ├── split.scm ├── streams.scm ├── string-case.scm ├── string-digest.scm ├── string-expand.scm ├── string-find-last.scm ├── string-find.scm ├── string-last-position.scm ├── string-map.scm ├── string-parse.scm ├── string-position.scm ├── string-prefixeqp.scm ├── string-reverse.scm ├── string-scan.scm ├── string-split.scm ├── string-tools.scm ├── string-translate.scm ├── string-unsplit.scm ├── sublist.scm ├── subsetp.scm ├── substitute.scm ├── subvector.scm ├── sum.scm ├── symbols.scm ├── syntax-extensions.scm ├── syntax-rules.scm ├── t-sort.scm ├── tagbody.scm ├── take.scm ├── threads.scm ├── transpose.scm ├── tree-copy.scm ├── tree-equalp.scm ├── tree-map.scm ├── type-case.scm ├── union.scm ├── unsort.scm ├── url-decode.scm ├── vector-map.scm ├── vector-tools.scm ├── when.scm ├── while.scm └── write-to-string.scm ├── mkfile ├── prog ├── adventure.adv ├── adventure.intro ├── advgen.scm ├── advgen.txt ├── c2html1.scm ├── cols.scm ├── dupes.scm ├── edoc.css ├── edoc.scm ├── htmlify.scm ├── s9e1.scm ├── s9help.scm ├── s9hts.scm ├── s9resolve.scm ├── s9symbols.scm ├── scm2html1.scm ├── scmpp.scm └── soccat.scm ├── s9-real.c ├── s9-real.scm ├── s9.1 ├── s9.1.txt ├── s9.c ├── s9.h ├── s9.scm └── util ├── categories.html ├── check-descr.scm ├── descriptions ├── dirhead ├── dirtail ├── libhead ├── libtail ├── libtest.sh ├── make-cats.scm ├── make-docs ├── make-help-links ├── make-html ├── pagehead ├── pagetail ├── realtest.scm ├── rp_html ├── rpp.c ├── s9.css ├── srtest.scm ├── stress-tests.tgz ├── systest.scm └── test.scm /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.gz 3 | *.image 4 | s9 5 | util/libtest.scm 6 | 7 | -------------------------------------------------------------------------------- /CHANGES: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/CHANGES -------------------------------------------------------------------------------- /MASCOT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/MASCOT.png -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | 2 | - S9E: 3 | - [^L][!] (shell) command. 4 | 5 | - macro tests 6 | 7 | - EDOC: handle white space in block comments properly 8 | 9 | ! LETREC + double CALL/CC Petrofsky test fails 10 | (OK, this is to be expected.) 11 | 12 | -------------------------------------------------------------------------------- /config.scm: -------------------------------------------------------------------------------- 1 | ; Configuration file for the S9 default heap image. 2 | ; Choose your extras or add your own stuff. 3 | 4 | (load-from-library "help.scm") 5 | (load-from-library "pretty-print.scm") 6 | (load-from-library "draw-tree.scm") 7 | 8 | (load-from-library "hash-table.scm") 9 | (load-from-library "keyword-value.scm") 10 | (load-from-library "id.scm") 11 | 12 | (load-from-library "graph-tools.scm") 13 | (load-from-library "io-tools.scm") 14 | (load-from-library "list-tools.scm") 15 | (load-from-library "math-tools.scm") 16 | (load-from-library "set-tools.scm") 17 | (load-from-library "string-tools.scm") 18 | (load-from-library "syntax-extensions.scm") 19 | (load-from-library "vector-tools.scm") 20 | 21 | (load-from-library "unix-tools.scm") 22 | -------------------------------------------------------------------------------- /configure: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat < unspecific 6 | ; (flush-output-port) ==> unspecific 7 | ; 8 | ; Flush the given output port by writing all pending output to 9 | ; the associated file descriptor. When no port is specified, 10 | ; flush (current-output-port). 11 | ; 12 | ; (Example): (flush-output-port) ==> unspecific 13 | 14 | (require-extension sys-unix) 15 | 16 | (define (flush-output-port . port) 17 | (if (null? port) 18 | (sys:flush (current-output-port)) 19 | (sys:flush (car port)))) 20 | -------------------------------------------------------------------------------- /ext/leap-yearp.scm: -------------------------------------------------------------------------------- 1 | ; Scheme 9 from Empty Space, Function Library 2 | ; By Nils M Holm, 2009 3 | ; Placed in the Public Domain 4 | ; 5 | ; (leap-year? integer) ==> boolean 6 | ; 7 | ; Return #T if INTEGER represents a leap year and otherwise return #F. 8 | ; 9 | ; Example: (leap-year? 2000) ==> #t 10 | ; (leap-year? 2003) ==> #f 11 | 12 | (define (leap-year? x) 13 | (or (zero? (remainder x 400)) 14 | (and (zero? (remainder x 4)) 15 | (not (zero? (remainder x 100)))))) 16 | -------------------------------------------------------------------------------- /help/abs: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (abs number) ==> number 2 | 3 | ABS returns the magnitude of its argument. 4 | 5 | (abs -7) ==> 7 6 | -------------------------------------------------------------------------------- /help/accept-keywords: -------------------------------------------------------------------------------- 1 | keyword-value -------------------------------------------------------------------------------- /help/acos: -------------------------------------------------------------------------------- 1 | exp -------------------------------------------------------------------------------- /help/adjoin: -------------------------------------------------------------------------------- 1 | S9 LIB (adjoin object list) ==> list 2 | 3 | Add an element to a set. 4 | 5 | (adjoin 'x '(a b c)) ==> (x a b c) 6 | (adjoin 'c '(a b c)) ==> (a b c) 7 | -------------------------------------------------------------------------------- /help/alist-to-hash-table: -------------------------------------------------------------------------------- 1 | make-hash-table -------------------------------------------------------------------------------- /help/amb-collector: -------------------------------------------------------------------------------- 1 | amb -------------------------------------------------------------------------------- /help/amb-donep: -------------------------------------------------------------------------------- 1 | amb -------------------------------------------------------------------------------- /help/amb-reset: -------------------------------------------------------------------------------- 1 | amb -------------------------------------------------------------------------------- /help/and: -------------------------------------------------------------------------------- 1 | R4RS 4.2.1 (and ...) ==> object 2 | 3 | The s are evaluated from left to right, and the value 4 | of the first expression that evaluates to a false value is returned. 5 | Any remaining expressions are not evaluated. If all the expressions 6 | evaluate to true values, the value of the last expression is returned. 7 | If there are no expressions then #T is returned. 8 | 9 | (and (= 2 2) (> 2 1)) ==> #t 10 | (and (= 2 2) (< 2 1)) ==> #f 11 | (and 1 2 'c '(f g)) ==> (f g) 12 | (and) ==> #t 13 | -------------------------------------------------------------------------------- /help/append: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (append list ...) ==> list 2 | (append list ... object) ==> object 3 | 4 | Returns a list consisting of the elements of the first list followed 5 | by the elements of the other lists. 6 | 7 | (append '(x) '(y)) ==> (x y) 8 | (append '(a) '(b c d)) ==> (a b c d) 9 | (append '(a (b)) '((c))) ==> (a (b) (c)) 10 | 11 | The resulting list is always newly allocated, except that it shares 12 | structure with the last list argument. The last argument may actually 13 | be any object; an improper list results if the last argument is not 14 | a proper list. 15 | 16 | (append '(a b) '(c . d)) ==> (a b c . d) 17 | (append '() 'a) ==> a 18 | -------------------------------------------------------------------------------- /help/append-streams: -------------------------------------------------------------------------------- 1 | make-stream -------------------------------------------------------------------------------- /help/append-to-output-file: -------------------------------------------------------------------------------- 1 | S9 LIB (append-to-output-file string) ==> output-port 2 | 3 | Take a string naming an output file and return an output port 4 | capable of writing characters to the that file. Characters 5 | written to the port will be appended to the file. When the 6 | file does not exist when this procedure is called, it will 7 | be created. If the file cannot be opened, an error is signalled. 8 | 9 | (append-to-output-file "logfile") ==> # 10 | -------------------------------------------------------------------------------- /help/appendb: -------------------------------------------------------------------------------- 1 | S9 LIB (append! list ...) ==> unspecific 2 | (append! list ... object) ==> unspecific 3 | 4 | APPEND! is like APPEND, but appends the LISTs destructively. 5 | It destroys all but the last object passed to it and returns 6 | an unspecific value. The append!ed list will be stored in the 7 | first LIST, which should be bound to a symbol or it will not 8 | be accessible after the operation. The first LIST may not be 9 | '(). 10 | 11 | (let ((a (list 1 2 3))) 12 | (append! a (list 4 5 6) 'end) 13 | a) ==> (1 2 3 4 5 6 . end) 14 | -------------------------------------------------------------------------------- /help/apply: -------------------------------------------------------------------------------- 1 | R4RS 6.8 (apply procedure list) ==> object 2 | (apply procedure object ... list) ==> object 3 | 4 | The first form calls PROCEDURE with the elements of LIST as 5 | the actual arguments. The second form is a generalization of 6 | the first that calls PROCEDURE with the elements of the list 7 | (append (list object ...) LIST) as the actual arguments. 8 | 9 | (apply + (list 3 4)) ==> 7 10 | 11 | (define (compose f g) 12 | (lambda args (f (apply g args))))) 13 | ((compose - *) 5 7) ==> -35 14 | -------------------------------------------------------------------------------- /help/apropos: -------------------------------------------------------------------------------- 1 | help -------------------------------------------------------------------------------- /help/argv: -------------------------------------------------------------------------------- 1 | S9fES (argv integer) ==> string | #f 2 | 3 | Return the value of the command line argument at the given position. 4 | If the there are less than INTEGER+1 arguments, return #F. The first 5 | argument is at position 0. 6 | 7 | (argv 0) ==> "first-argument" 8 | -------------------------------------------------------------------------------- /help/array: -------------------------------------------------------------------------------- 1 | make-array -------------------------------------------------------------------------------- /help/array-dimensions: -------------------------------------------------------------------------------- 1 | make-array -------------------------------------------------------------------------------- /help/array-map: -------------------------------------------------------------------------------- 1 | make-array -------------------------------------------------------------------------------- /help/array-rank: -------------------------------------------------------------------------------- 1 | make-array -------------------------------------------------------------------------------- /help/array-ref: -------------------------------------------------------------------------------- 1 | make-array -------------------------------------------------------------------------------- /help/array-setb: -------------------------------------------------------------------------------- 1 | make-array -------------------------------------------------------------------------------- /help/arrayp: -------------------------------------------------------------------------------- 1 | make-array -------------------------------------------------------------------------------- /help/asin: -------------------------------------------------------------------------------- 1 | exp -------------------------------------------------------------------------------- /help/assert-record-type: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/assoc: -------------------------------------------------------------------------------- 1 | assq -------------------------------------------------------------------------------- /help/assp: -------------------------------------------------------------------------------- 1 | S9 LIB (assp procedure^2 object alist) ==> object | #f 2 | 3 | Find the first member X of an alist for which 4 | 5 | (procedure^2 object (car X)) 6 | 7 | holds. When no such member exists, return #F. 8 | 9 | (assp char=? #\b '((#\a . 1) (#\b . 2))) ==> (#\b . 2) 10 | -------------------------------------------------------------------------------- /help/assv: -------------------------------------------------------------------------------- 1 | assq -------------------------------------------------------------------------------- /help/atan: -------------------------------------------------------------------------------- 1 | exp -------------------------------------------------------------------------------- /help/basename: -------------------------------------------------------------------------------- 1 | S9 LIB (basename string) ==> string 2 | (basename string string2) ==> string 3 | 4 | Return the rightmost component of the path name given in STRING. 5 | When STRING2 is given also remove a STRING2 suffix (if any) from 6 | STRING. 7 | 8 | (basename "/foo/bar/baz") ==> "baz" 9 | (basename "/goo/bar.Z" ".Z") ==> "bar" 10 | -------------------------------------------------------------------------------- /help/begin: -------------------------------------------------------------------------------- 1 | R4RS 4.2.3 (begin ...) ==> object 2 | 3 | The s are evaluated sequentially from left to right, 4 | and the value of the last expression is returned. This expression 5 | type is used to sequence side effects such as input and output. 6 | 7 | (define x 0) 8 | 9 | (begin (set! x 5) 10 | (+ x 1)) ==> 6 11 | 12 | (begin (display "4 plus 1 equals ") 13 | (display (+ 4 1))) ==> unspecific 14 | ; side effect: print 4 plus 1 equals 5 15 | 16 | S9fES allows BEGIN to take zero arguments, returning an unspecific 17 | value. 18 | -------------------------------------------------------------------------------- /help/binary-string-to-integer: -------------------------------------------------------------------------------- 1 | integer-to-binary-string -------------------------------------------------------------------------------- /help/bit1: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bita: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitb: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitca: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitcb: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitcplus: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitcstar: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/biteq: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitneq: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitnplus: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitnstar: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitplus: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitplusc: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitsl: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitsr: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitstar: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitstarc: -------------------------------------------------------------------------------- 1 | bit0 -------------------------------------------------------------------------------- /help/bitwise-1: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-2: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-and-c1: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-and-c2: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-and-not: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-c1: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-c2: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-clear: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-or: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-or-c1: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-or-c2: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-or-not: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-set: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-shift-left: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-shift-right: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-xor: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/bitwise-xor-not: -------------------------------------------------------------------------------- 1 | bitwise-and -------------------------------------------------------------------------------- /help/booleanp: -------------------------------------------------------------------------------- 1 | R4RS 6.1 (boolean? object) ==> boolean 2 | 3 | BOOLEAN? returns #T if OBJECT is either #T or #F and returns #F 4 | otherwise. 5 | 6 | (boolean? #f) ==> #t 7 | (boolean? 0) ==> #f 8 | (boolean? '()) ==> #f 9 | -------------------------------------------------------------------------------- /help/caaaar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caaadr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caaar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caadar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caaddr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caadr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caar: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (caar pair) ==> object 2 | (cadr pair) ==> object 3 | ... 4 | (cdddar pair) ==> object 5 | (cddddr pair) ==> object 6 | 7 | These procedures are compositions of car and cdr, where for example 8 | caddr could be defined by 9 | 10 | (define (caddr x) (car (cdr (cdr x)))). 11 | 12 | Arbitrary compositions, up to four deep, are provided. There are 13 | twenty-eight of these procedures in all. 14 | -------------------------------------------------------------------------------- /help/cadaar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cadadr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cadar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caddar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cadddr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/caddr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cadr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/call-next-method: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/call-with-output-file: -------------------------------------------------------------------------------- 1 | call-with-input-file -------------------------------------------------------------------------------- /help/call-with-stderr: -------------------------------------------------------------------------------- 1 | standard-error-port -------------------------------------------------------------------------------- /help/callslashcc: -------------------------------------------------------------------------------- 1 | call-with-current-continuation -------------------------------------------------------------------------------- /help/canvas-draw: -------------------------------------------------------------------------------- 1 | make-canvas -------------------------------------------------------------------------------- /help/canvas-draw-string: -------------------------------------------------------------------------------- 1 | make-canvas -------------------------------------------------------------------------------- /help/canvas-dump: -------------------------------------------------------------------------------- 1 | make-canvas -------------------------------------------------------------------------------- /help/canvas-plot: -------------------------------------------------------------------------------- 1 | make-canvas -------------------------------------------------------------------------------- /help/canvas-plot-line: -------------------------------------------------------------------------------- 1 | make-canvas -------------------------------------------------------------------------------- /help/car: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (car pair) ==> object 2 | 3 | Returns the contents of the car field of PAIR. Note that it is an 4 | error to take the car of the empty list. 5 | 6 | (car '(a b c)) ==> a 7 | (car '((a) b c d)) ==> (a) 8 | (car '(1 . 2)) ==> 1 9 | (car '()) ==> error 10 | -------------------------------------------------------------------------------- /help/cdaaar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdaadr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdaar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdadar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdaddr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdadr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cddaar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cddadr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cddar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdddar: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cddddr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdddr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cddr: -------------------------------------------------------------------------------- 1 | caar -------------------------------------------------------------------------------- /help/cdr: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (cdr pair) ==> object 2 | 3 | Returns the contents of the cdr field of PAIR. Note that it is an 4 | error to take the cdr of the empty list. 5 | 6 | (cdr '((a) b c d)) ==> (b c d) 7 | (cdr '(1 . 2)) ==> 2 8 | (cdr '()) ==> error 9 | -------------------------------------------------------------------------------- /help/ceiling: -------------------------------------------------------------------------------- 1 | floor -------------------------------------------------------------------------------- /help/char-alphabeticp: -------------------------------------------------------------------------------- 1 | R4RS 6.6 (char-alphabetic? char) ==> boolean 2 | (char-numeric? char) ==> boolean 3 | (char-whitespace? char) ==> boolean 4 | (char-upper-case? char) ==> boolean 5 | (char-lower-case? char) ==> boolean 6 | 7 | These procedures return #T if their arguments are alphabetic, 8 | numeric, whitespace, upper case, or lower case characters, respectively, 9 | otherwise they return #F. The following remarks, which are specific 10 | to the ASCII character set, are intended only as a guide: The 11 | alphabetic characters are the 52 upper and lower case letters. The 12 | numeric characters are the ten decimal digits. The whitespace 13 | characters are space, tab, line feed, form feed, and carriage return. 14 | -------------------------------------------------------------------------------- /help/char-cieqp: -------------------------------------------------------------------------------- 1 | R4RS 6.6 (char-ci=? char1 char2) ==> boolean 2 | (char-ci boolean 3 | (char-ci>? char1 char2) ==> boolean 4 | (char-ci<=? char1 char2) ==> boolean 5 | (char-ci>=? char1 char2) ==> boolean 6 | 7 | These procedures are similar to CHAR=? et cetera, but they treat 8 | upper case and lower case letters as the same. For example, 9 | 10 | (char-ci=? #\A #\a) ==> #t. 11 | 12 | Some implementations may generalize these procedures to take more 13 | than two arguments, as with the corresponding numerical predicates. 14 | 15 | The S9fES versions of these procedures do accept more than two 16 | arguments. 17 | -------------------------------------------------------------------------------- /help/char-cigep: -------------------------------------------------------------------------------- 1 | char-cieqp -------------------------------------------------------------------------------- /help/char-cigtp: -------------------------------------------------------------------------------- 1 | char-cieqp -------------------------------------------------------------------------------- /help/char-cilep: -------------------------------------------------------------------------------- 1 | char-cieqp -------------------------------------------------------------------------------- /help/char-ciltp: -------------------------------------------------------------------------------- 1 | char-cieqp -------------------------------------------------------------------------------- /help/char-downcase: -------------------------------------------------------------------------------- 1 | char-upcase -------------------------------------------------------------------------------- /help/char-lower-casep: -------------------------------------------------------------------------------- 1 | char-alphabeticp -------------------------------------------------------------------------------- /help/char-numericp: -------------------------------------------------------------------------------- 1 | char-alphabeticp -------------------------------------------------------------------------------- /help/char-upcase: -------------------------------------------------------------------------------- 1 | R4RS 6.6 (char-upcase char) ==> char 2 | (char-downcase char) ==> char 3 | 4 | These procedures return a character CHAR2 such that 5 | 6 | (char-ci=? char char2) ==> #t. 7 | 8 | In addition, if CHAR is alphabetic, then the result of CHAR-UPCASE 9 | is upper case and the result of CHAR-DOWNCASE is lower case. 10 | -------------------------------------------------------------------------------- /help/char-upper-casep: -------------------------------------------------------------------------------- 1 | char-alphabeticp -------------------------------------------------------------------------------- /help/char-whitespacep: -------------------------------------------------------------------------------- 1 | char-alphabeticp -------------------------------------------------------------------------------- /help/chargep: -------------------------------------------------------------------------------- 1 | chareqp -------------------------------------------------------------------------------- /help/chargtp: -------------------------------------------------------------------------------- 1 | chareqp -------------------------------------------------------------------------------- /help/charlep: -------------------------------------------------------------------------------- 1 | chareqp -------------------------------------------------------------------------------- /help/charltp: -------------------------------------------------------------------------------- 1 | chareqp -------------------------------------------------------------------------------- /help/charp: -------------------------------------------------------------------------------- 1 | R4RS 6.6 (char? object) ==> boolean 2 | 3 | Returns #T if OBJECT is a character, otherwise returns #F. 4 | -------------------------------------------------------------------------------- /help/choose: -------------------------------------------------------------------------------- 1 | S9 LIB (choose integer1 integer2) ==> integer 2 | 3 | Return the binomial coefficient ("n choose k") of INTEGER1 (n) 4 | and INTEGER2 (k), i.e. the number of unique k-tuples that can be 5 | choosen without repetition from a set of n elements. INTEGER2 (k) 6 | must be positive. 7 | 8 | (choose 23 1) ==> 23 9 | (choose 23 2) ==> 253 10 | (choose 23 3) ==> 1771 11 | -------------------------------------------------------------------------------- /help/class-of: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/classp: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/close-input-port: -------------------------------------------------------------------------------- 1 | R4RS 6.10 (close-input-port input-port) ==> unspecific 2 | (close-output-port output-port) ==> unspecific 3 | 4 | Closes the file associated with INPUT-PORT or OUTPUT-PORT respectively, 5 | rendering the port incapable of delivering or accepting characters. 6 | 7 | These routines have no effect if the file has already been closed. 8 | The value returned is unspecified. 9 | -------------------------------------------------------------------------------- /help/close-output-port: -------------------------------------------------------------------------------- 1 | close-input-port -------------------------------------------------------------------------------- /help/collect: -------------------------------------------------------------------------------- 1 | S9 LIB (collect procedure list) ==> list 2 | 3 | Collect elements from LIST as long as two subsequent elements 4 | E1 and E2 satisfy the predicate (PROCEDURE E1 E2). When two 5 | subsequent elements do not satisfy the predicate, start a new 6 | output list. Concatenate all output lists in the result. 7 | 8 | (collect eq? '(a a a b c c)) ==> ((a a a) (b) (c c)) 9 | (collect < '(1 2 3 3 4 5 4)) ==> ((1 2 3) (3 4 5) (4)) 10 | -------------------------------------------------------------------------------- /help/combine: -------------------------------------------------------------------------------- 1 | S9 LIB (combine integer list) ==> list 2 | (combine* integer list) ==> list 3 | 4 | (load-from-library "combine.scm") 5 | 6 | Create k-combinations of the elements of the given list. K (the 7 | size of the combinations) is specified in the integer argument. 8 | COMBINE creates combinations without repetition, and COMBINE* 9 | creates combinations with repetition. 10 | 11 | (combine 2 '(a b c)) ==> ((a b) (a c) (b c)) 12 | (combine* 2 '(a b c)) ==> ((a a) (a b) (a c) 13 | (b b) (b c) (c c)) 14 | -------------------------------------------------------------------------------- /help/combinestar: -------------------------------------------------------------------------------- 1 | combine -------------------------------------------------------------------------------- /help/compose: -------------------------------------------------------------------------------- 1 | complement -------------------------------------------------------------------------------- /help/cond-expand: -------------------------------------------------------------------------------- 1 | S9 LIB (cond-expand (symbol expression ...)) ==> object 2 | 3 | This is a subset of SRFI-0 COND-EXPAND. Each argument of COND-EXPAND 4 | is a clause consisting of a leading "feature ID" (a symbol) and any 5 | number of trailing expressions (a body). It evaluates to the body of 6 | the first clause having a feature ID of SCHEME-9-FROM-EMPTY-SPACE, 7 | S9FES, or ELSE. The body is then evaluated by S9fES. When none 8 | of the above feature IDs is found, an error is reported. 9 | 10 | (cond-expand (s9fes (cons 1 2))) ==> (1 . 2) 11 | (cond-expand (foo (cons 1 2)) (else (+ 1 2))) ==> 3 12 | -------------------------------------------------------------------------------- /help/cons: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (cons object1 object2) ==> pair 2 | 3 | Returns a newly allocated pair whose car is OBJECT1 and whose cdr 4 | is OBJECT2. The pair is guaranteed to be different (in the sense 5 | of EQV?) from every existing object. 6 | 7 | (cons 'a '()) ==> (a) 8 | (cons '(a) '(b c d)) ==> ((a) b c d) 9 | (cons "a" '(b c)) ==> ("a" b c) 10 | (cons 'a 3) ==> (a . 3) 11 | (cons '(a b) 'c) ==> ((a b) . c) 12 | -------------------------------------------------------------------------------- /help/const: -------------------------------------------------------------------------------- 1 | complement -------------------------------------------------------------------------------- /help/cos: -------------------------------------------------------------------------------- 1 | exp -------------------------------------------------------------------------------- /help/count: -------------------------------------------------------------------------------- 1 | S9 LIB (count pair) ==> integer 2 | 3 | Count atomic members of a pair. 4 | 5 | (count '(a (b (c)) d . e)) ==> 5 6 | -------------------------------------------------------------------------------- /help/current-input-port: -------------------------------------------------------------------------------- 1 | R4RS 6.10 (current-input-port) ==> input-port 2 | (current-output-port) ==> output-port 3 | 4 | Returns the current default input or output port. 5 | -------------------------------------------------------------------------------- /help/current-output-port: -------------------------------------------------------------------------------- 1 | current-input-port -------------------------------------------------------------------------------- /help/curry: -------------------------------------------------------------------------------- 1 | complement -------------------------------------------------------------------------------- /help/curryr: -------------------------------------------------------------------------------- 1 | complement -------------------------------------------------------------------------------- /help/curs_addstr: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_attron: -------------------------------------------------------------------------------- 1 | curs_attroff -------------------------------------------------------------------------------- /help/curs_attrset: -------------------------------------------------------------------------------- 1 | curs_attroff -------------------------------------------------------------------------------- /help/curs_beep: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_clear: -------------------------------------------------------------------------------- 1 | S9 EXT (curs:clear) ==> unspecific 2 | (curs:clrtobot) ==> unspecific 3 | (curs:clrtoeol) ==> unspecific 4 | 5 | Curses routines for clearing the screen. This is only a rough 6 | summary. See the curses(3) manual page or a curses tutorial of 7 | your choice for further information. 8 | 9 | These routines do not cause any effect before CURS:REFRESH (q.v.) 10 | is called. 11 | 12 | CURS:CLEAR clears the entire virtual screen. 13 | 14 | CURS:CLRTOBOT clears the current line from the current column 15 | of the virtual cursor to the end of the line as well as all 16 | lines below the virtual cursor. 17 | 18 | CURS:CLRTOEOL clears the current line from the current column 19 | of the virtual cursor to the end of the line. 20 | -------------------------------------------------------------------------------- /help/curs_clearok: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_clrtobot: -------------------------------------------------------------------------------- 1 | curs_clear -------------------------------------------------------------------------------- /help/curs_clrtoeol: -------------------------------------------------------------------------------- 1 | curs_clear -------------------------------------------------------------------------------- /help/curs_color-set: -------------------------------------------------------------------------------- 1 | S9 EXT (curs:color-set integer_f integer_b) ==> unspecific 2 | (curs:has-colors) ==> boolean 3 | 4 | CURS:COLOR-SET sets the foreground color of the screen to 5 | INTEGER_F and the background color to INTEGER_B. The following 6 | constants can be used in the places of the integers: 7 | 8 | CURS:COLOR-BLACK CURS:COLOR-CYAN CURS:COLOR-YELLOW 9 | CURS:COLOR-BLUE CURS:COLOR-RED CURS:COLOR-GRAY 10 | CURS:COLOR-GREEN CURS:COLOR-MAGENTA 11 | 12 | Note that the pair black/black may be reserved for the terminal's 13 | default colors. 14 | 15 | CURS:HAS-COLORS returns #T when color support is available and 16 | otherwise #F. Color support is only available, if it has been 17 | compiled into Scheme 9 and the connected terminal offers color 18 | support. 19 | -------------------------------------------------------------------------------- /help/curs_cols: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_cursoff: -------------------------------------------------------------------------------- 1 | S9 EXT (curs:cursoff) ==> unspecific 2 | (curs:curson) ==> unspecific 3 | (curs:mvcur int_oy int_ox int_y int_x) ==> unspecific 4 | 5 | Curses routines for manipulating the hardware cursor. This is only 6 | a rough summary. See the curses(3) manual page or a curses tutorial 7 | of your choice for further information. 8 | 9 | CURS:CURSOFF makes the hardware cursor invisible. 10 | 11 | CURS:CURSOFF makes the hardware cursor visible. 12 | 13 | CURS:MVCUR moves the hardware cursor from position (INT_OY,INT_OX) 14 | to position (INT_Y,INT_X). 15 | -------------------------------------------------------------------------------- /help/curs_curson: -------------------------------------------------------------------------------- 1 | curs_cursoff -------------------------------------------------------------------------------- /help/curs_deleteln: -------------------------------------------------------------------------------- 1 | curs_delch -------------------------------------------------------------------------------- /help/curs_echo: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_flash: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_get-magic-value: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_getch: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_getyx: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_has-colors: -------------------------------------------------------------------------------- 1 | curs_color-set -------------------------------------------------------------------------------- /help/curs_idlok: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_inch: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_initscr: -------------------------------------------------------------------------------- 1 | curs_endwin -------------------------------------------------------------------------------- /help/curs_insch: -------------------------------------------------------------------------------- 1 | curs_delch -------------------------------------------------------------------------------- /help/curs_insertln: -------------------------------------------------------------------------------- 1 | curs_delch -------------------------------------------------------------------------------- /help/curs_keypad: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_lines: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_move: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_mvaddch: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_mvaddstr: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_mvcur: -------------------------------------------------------------------------------- 1 | curs_cursoff -------------------------------------------------------------------------------- /help/curs_mvdelch: -------------------------------------------------------------------------------- 1 | curs_delch -------------------------------------------------------------------------------- /help/curs_mvgetch: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_mvinch: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_mvinsch: -------------------------------------------------------------------------------- 1 | curs_delch -------------------------------------------------------------------------------- /help/curs_nl: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_nocbreak: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_nodelay: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_noecho: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_nonl: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_noraw: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_raw: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_refresh: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_resetty: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_savetty: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_scroll: -------------------------------------------------------------------------------- 1 | curs_addch -------------------------------------------------------------------------------- /help/curs_scrollok: -------------------------------------------------------------------------------- 1 | curs_cbreak -------------------------------------------------------------------------------- /help/curs_standend: -------------------------------------------------------------------------------- 1 | curs_attroff -------------------------------------------------------------------------------- /help/curs_standout: -------------------------------------------------------------------------------- 1 | curs_attroff -------------------------------------------------------------------------------- /help/curs_unctrl: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/curs_ungetch: -------------------------------------------------------------------------------- 1 | curs_flushinp -------------------------------------------------------------------------------- /help/data-structures: -------------------------------------------------------------------------------- 1 | S9 LIB Convenience file to load additional high-level data structures. 2 | 3 | (load-from-library "array.scm") 4 | (load-from-library "define-structure.scm") 5 | (load-from-library "hash-table.scm") 6 | (load-from-library "queue.scm") 7 | (load-from-library "rb-tree.scm") 8 | 9 | -------------------------------------------------------------------------------- /help/decb: -------------------------------------------------------------------------------- 1 | pushb -------------------------------------------------------------------------------- /help/define-generic: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/define-memoizing: -------------------------------------------------------------------------------- 1 | memoize -------------------------------------------------------------------------------- /help/define-method: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/delay: -------------------------------------------------------------------------------- 1 | force -------------------------------------------------------------------------------- /help/delete-file: -------------------------------------------------------------------------------- 1 | S9fES (delete-file string) ==> unspecific 2 | 3 | Delete the file specifed in the STRING argument. If the file does 4 | not exist or cannot be deleted, report an error. 5 | -------------------------------------------------------------------------------- /help/depth: -------------------------------------------------------------------------------- 1 | S9 LIB (depth list) ==> integer 2 | 3 | Compute the depth of a list. 4 | 5 | (depth '(a (b (c d (e))))) ==> 4 6 | -------------------------------------------------------------------------------- /help/dirname: -------------------------------------------------------------------------------- 1 | S9 LIB (dirname string) ==> string 2 | 3 | Return the directory part of the path name in STRING. Note that 4 | DIRNAME performs merely a syntaxical operation without any regard 5 | to the actual file system structure, i.e. 6 | 7 | (dirname "/foo/bar") ==> "/foo" 8 | 9 | even if "bar" is also a directory. DIRNAME also takes care of 10 | trailing slashes and recognizes some special cases (see examples). 11 | 12 | (dirname "/foo/bar/baz") ==> "/foo/bar" 13 | (dirname "foo/bar") ==> "foo" 14 | (dirname "foo/bar/") ==> "foo" 15 | (dirname "/foo") ==> "/" 16 | (dirname "/") ==> "/" 17 | (dirname "foo") ==> "." 18 | -------------------------------------------------------------------------------- /help/display-to-string: -------------------------------------------------------------------------------- 1 | write-to-string -------------------------------------------------------------------------------- /help/display-usage: -------------------------------------------------------------------------------- 1 | parse-optionsb -------------------------------------------------------------------------------- /help/displaystar: -------------------------------------------------------------------------------- 1 | S9 LIB (display* object ...) ==> unspecific 2 | (display* output-port object ...) ==> unspecific 3 | 4 | (load-from-library "displaystar.scm") 5 | 6 | Display each OBJECT in the same way as DISPLAY. When the first 7 | argument of DISPLAY* is an output port, write all output to 8 | that port. 9 | 10 | (display* "foo" #\= 17 #\newline) ==> unspecific 11 | ; output: foo = 17 12 | -------------------------------------------------------------------------------- /help/draw-tree: -------------------------------------------------------------------------------- 1 | S9 LIB (draw-tree object) ==> unspecific 2 | 3 | Print a tree structure resembling a Scheme datum. Each cons 4 | cell is represented by [o|o] with lines leading to their car 5 | and cdr parts. Conses with a cdr value of () are represented 6 | by [o|/]. 7 | 8 | (draw-tree '((a) (b . c) (d e))) ==> unspecific 9 | 10 | Output: [o|o]---[o|o]---[o|/] 11 | | | | 12 | [o|/] | [o|o]---[o|/] 13 | | | | | 14 | a | d e 15 | | 16 | [o|o]--- c 17 | | 18 | b 19 | -------------------------------------------------------------------------------- /help/dt: -------------------------------------------------------------------------------- 1 | draw-tree -------------------------------------------------------------------------------- /help/dump-image: -------------------------------------------------------------------------------- 1 | S9fES (dump-image string) ==> unspecific 2 | 3 | Write a heap image to the file given in the STRING argument. 4 | If the file already exists, report an error. 5 | -------------------------------------------------------------------------------- /help/dupp: -------------------------------------------------------------------------------- 1 | duplicates -------------------------------------------------------------------------------- /help/dupq: -------------------------------------------------------------------------------- 1 | duplicates -------------------------------------------------------------------------------- /help/dupv: -------------------------------------------------------------------------------- 1 | duplicates -------------------------------------------------------------------------------- /help/environ: -------------------------------------------------------------------------------- 1 | S9fES (environ string) ==> string | #f 2 | 3 | Return the value of the environment variable STRING. If 4 | the variable is undefined, return #F. 5 | 6 | (environ "HOME") ==> "/u/home/nmh" 7 | (environ "nonexistent") ==> #f 8 | -------------------------------------------------------------------------------- /help/eof-objectp: -------------------------------------------------------------------------------- 1 | R4RS 6.10.2 (eof-object? object) ==> boolean 2 | 3 | Returns #T if OBJECT is an end of file object, otherwise returns #F. 4 | The precise set of end of file objects will vary among implementations, 5 | but in any case no end of file object will ever be an object that 6 | can be read in using read. 7 | -------------------------------------------------------------------------------- /help/equal-cip: -------------------------------------------------------------------------------- 1 | S9 LIB (equal-ci? object1 object2) ==> boolean 2 | 3 | EQUAL-CI? is like EQUAL?, but compares strings and characters 4 | using case-insensitive predicates whereas EQUAL? distinguishes 5 | case. 6 | 7 | (equal-ci? '(#\A ("b")) '(#\a ("B"))) ==> #t 8 | -------------------------------------------------------------------------------- /help/equalp: -------------------------------------------------------------------------------- 1 | R4RS 6.2 (equal? object1 object2) ==> boolean 2 | 3 | EQUAL? recursively compares the contents of pairs, vectors, and 4 | strings, applying eqv? on other objects such as numbers and symbols. 5 | A rule of thumb is that objects are generally EQUAL? if they print 6 | the same. EQUAL? may fail to terminate if its arguments are circular 7 | data structures. 8 | 9 | (equal? 'a 'a) ==> #t 10 | (equal? '(a) '(a)) ==> #t 11 | (equal? '(a (b) c) 12 | '(a (b) c)) ==> #t 13 | (equal? "abc" "abc") ==> #t 14 | (equal? 2 2) ==> #t 15 | (equal? (make-vector 5 'a) 16 | (make-vector 5 'a)) ==> #t 17 | (equal? (lambda (x) x) 18 | (lambda (y) y)) ==> unspecified 19 | -------------------------------------------------------------------------------- /help/error: -------------------------------------------------------------------------------- 1 | S9fES (error string) ==> undefined 2 | (error string object) ==> undefined 3 | 4 | Display the message in STRING. If OBJECT is given, display a colon, 5 | a space character, and the external representation of OBJECT after 6 | the message. After printing the message, abort evaluation. No result 7 | is returned. 8 | 9 | Rationale: ERROR is used by S9fES programs to signal errors. 10 | -------------------------------------------------------------------------------- /help/evenp: -------------------------------------------------------------------------------- 1 | zerop -------------------------------------------------------------------------------- /help/exact-to-inexact: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (exact->inexact number) ==> number 2 | (inexact->exact number) ==> number 3 | 4 | EXACT->INEXACT returns an inexact representation of NUMBER. The 5 | value returned is the inexact number that is numerically closest 6 | to the argument. 7 | 8 | INEXACT->EXACT returns an exact representation of NUMBER. The 9 | value returned is the exact number that is numerically closest 10 | to the argument. 11 | -------------------------------------------------------------------------------- /help/exactp: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (exact? number) ==> boolean 2 | (inexact? number) ==> boolean 3 | 4 | These numerical predicates provide tests for the exactness of a 5 | quantity. For any Scheme number, precisely one of these predicates 6 | is true. 7 | -------------------------------------------------------------------------------- /help/exists: -------------------------------------------------------------------------------- 1 | S9 LIB (exists procedure list ...) ==> boolean 2 | 3 | Test whether a given property exists in a sequence of N lists. 4 | The property is expressed using the N-ary predicate P, which 5 | is given in the procedure argument. P is first applied to a 6 | list consisting of the first member of each given list. If P 7 | returns truth, EXISTS returns #T immediately. Otherwise it is 8 | applied to a list consisting of the second members of the given 9 | lists, etc. If P returns falsity for all sets of members, EXISTS 10 | returns #F. 11 | 12 | (exists < '(9 1) '(8 2) '(7 3)) ==> #t 13 | ; because (< 1 2 3) 14 | -------------------------------------------------------------------------------- /help/exp: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (exp number) ==> number 2 | (log number) ==> number 3 | (sin number) ==> number 4 | (cos number) ==> number 5 | (tan number) ==> number 6 | (asin number) ==> number 7 | (acos number) ==> number 8 | (atan number) ==> number 9 | 10 | These procedures compute the usual transcendental functions. 11 | LOG computes the natural logarithm of NUMBER (not the base ten 12 | logarithm). ASIN, ACOS, and ATAN compute arcsine (sin^-1), 13 | arccosine (cos^-1), and arctangent (tan^-1), respectively. 14 | -------------------------------------------------------------------------------- /help/explode: -------------------------------------------------------------------------------- 1 | S9 LIB (explode symbol) ==> list 2 | 3 | Explode a symbol into a list of single-character symbols. 4 | 5 | (explode 'supernova) ==> (s u p e r n o v a) 6 | -------------------------------------------------------------------------------- /help/expt: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (expt number1 number2) ==> number 2 | 3 | Returns NUMBER1 raised to the power NUMBER2. 4 | 5 | (Expt 0 0) is defined to be equal to 1. 6 | -------------------------------------------------------------------------------- /help/factb: -------------------------------------------------------------------------------- 1 | prolog -------------------------------------------------------------------------------- /help/factor: -------------------------------------------------------------------------------- 1 | S9 LIB (factor integer) ==> list 2 | 3 | Factor an integer down to its constituent primes. 4 | The resulting list has the form ((base exponent) ...) 5 | 6 | (factor 24) ==> ((3 1) (2 3)) 7 | -------------------------------------------------------------------------------- /help/factorial: -------------------------------------------------------------------------------- 1 | S9 LIB (factorial integer) ==> integer 2 | 3 | Compute the factorial of a number. 4 | 5 | (factorial 30) ==> 265252859812191058636308480000000 6 | -------------------------------------------------------------------------------- /help/false: -------------------------------------------------------------------------------- 1 | id -------------------------------------------------------------------------------- /help/file-existsp: -------------------------------------------------------------------------------- 1 | S9fES (file-exists? string) ==> boolean 2 | 3 | Return #T if the file specifed in the STRING argument exists and 4 | otherwise return #F. 5 | -------------------------------------------------------------------------------- /help/filter: -------------------------------------------------------------------------------- 1 | S9 LIB (filter procecure^1 list) ==> list 2 | 3 | Extract elements from a list. PROCEDURE describes the property 4 | of the elements to be extracted. It must be a procedure of one 5 | argument. 6 | 7 | (filter number? '(a 1 b 2 c 3)) ==> (1 2 3) 8 | -------------------------------------------------------------------------------- /help/filter-stream: -------------------------------------------------------------------------------- 1 | make-stream -------------------------------------------------------------------------------- /help/find-help-path: -------------------------------------------------------------------------------- 1 | S9 LIB (find-help-path) ==> string | #f 2 | 3 | Returns the directory in which the online help pages are stored 4 | of #F when the pages cannot be located. 5 | 6 | (find-help-path) ==> "/usr/local/share/s9fes/help" 7 | -------------------------------------------------------------------------------- /help/flatten: -------------------------------------------------------------------------------- 1 | S9 LIB (flatten pair) ==> list 2 | 3 | Convert tree to flat list. 4 | 5 | (flatten '(a (b ((c) d . e)))) ==> (a b c d e) 6 | -------------------------------------------------------------------------------- /help/fluid-let: -------------------------------------------------------------------------------- 1 | S9 LIB (fluid-let ((variable expression) ...) expression ...) ==> object 2 | 3 | Bind variables dynamically, i.e. assign a dynamic (rather than 4 | a lexical/static) value to each given variable. The variables 5 | must be defined outside of FLUID-LET. The difference between 6 | LET and FLUID-LET is as follows: 7 | 8 | (let ((a 0)) (let ((a 0)) 9 | (let ((f (lambda () a))) (let ((f (lambda () a))) 10 | (let ((a 1)) (fluid-let ((a 1)) 11 | (f)))) ==> 0 (f)))) ==> 1 12 | 13 | (let ((a 0)) 14 | (let ((f (lambda () a))) 15 | (fluid-let ((a 1)) 16 | (f)))) ==> 1 17 | -------------------------------------------------------------------------------- /help/flush-output-port: -------------------------------------------------------------------------------- 1 | S9 LIB (flush-output-port output-port) ==> unspecific 2 | (flush-output-port) ==> unspecific 3 | 4 | Flush the given output port by writing all pending output to 5 | the associated file descriptor. When no port is specified, 6 | flush (current-output-port). 7 | 8 | (flush-output-port) ==> unspecific 9 | -------------------------------------------------------------------------------- /help/for-all: -------------------------------------------------------------------------------- 1 | S9 LIB (for-all procedure list ...) ==> object 2 | 3 | Test whether all members of a sequence of N lists have a given 4 | property. The property is expressed using an N-ary predicate P, 5 | which is given in the procedure argument. P is applied to a list 6 | consisting of the first member of each given list. If P returns 7 | truth, it is applied to a list consisting of the second member of 8 | each given list, etc. If P returns falsity for any set of members, 9 | FOR-ALL returns #F. If only one set of members is left to check, 10 | FOR-ALL returns the value of P applied to this final set. 11 | When the LISTs are empty, FOR-ALL returns #T. 12 | 13 | (for-all < '(1 7) '(2 8) '(3 9)) ==> #t 14 | ; because (< 1 2 3) and (< 7 8 9) 15 | -------------------------------------------------------------------------------- /help/for-each: -------------------------------------------------------------------------------- 1 | R4RS 6.9 (for-each procedure list1 list2 ...) ==> unspecific 2 | 3 | The arguments to FOR-EACH are like the arguments to MAP, but FOR-EACH 4 | calls PROCEDURE for its side effects rather than for its values. 5 | Unlike MAP, FOR-EACH is guaranteed to call PROCEDURE on the elements 6 | of the lists in order from the first element to the last, and the 7 | value returned by FOR-EACH is unspecified. 8 | 9 | (let ((v (make-vector 5))) 10 | (for-each (lambda (i) 11 | (vector-set! v i (* i i))) 12 | '(0 1 2 3 4)) 13 | v) ==> #(0 1 4 9 16) 14 | -------------------------------------------------------------------------------- /help/fork: -------------------------------------------------------------------------------- 1 | complement -------------------------------------------------------------------------------- /help/gcd: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (gcd integer ...) ==> integer 2 | (lcm integer ...) ==> integer 3 | 4 | These procedures return the greatest common divisor or least common 5 | multiple of their arguments. The result is always non-negative. 6 | 7 | (gcd 32 -36) ==> 4 8 | (gcd) ==> 0 9 | (lcm 32 -36) ==> 288 10 | (lcm) ==> 1 11 | -------------------------------------------------------------------------------- /help/ge: -------------------------------------------------------------------------------- 1 | eq -------------------------------------------------------------------------------- /help/gensym: -------------------------------------------------------------------------------- 1 | S9fES (gensym symbol) ==> symbol 2 | (gensym string) ==> symbol 3 | (gensym) ==> symbol 4 | 5 | Return a fresh symbol that is guaranteed to be unique. When SYMBOL 6 | or STRING is passed to GENSYM, the returned symbol will have its 7 | characters as a prefix. 8 | 9 | (gensym) ==> g56 10 | (gensym "foo") ==> foo57 11 | (gensym 'bar) ==> bar58 12 | 13 | (let ((a (gensym)) 14 | (b (gensym)) 15 | (c (gensym))) 16 | (list a b c)) ==> (g63 g62 g61) 17 | -------------------------------------------------------------------------------- /help/go: -------------------------------------------------------------------------------- 1 | tagbody -------------------------------------------------------------------------------- /help/graph-tools: -------------------------------------------------------------------------------- 1 | S9 LIB Convenience file to load additional tree/DAG-processing procedures. 2 | 3 | (load-from-library "t-sort.scm") 4 | (load-from-library "tree-copy.scm") 5 | 6 | -------------------------------------------------------------------------------- /help/group: -------------------------------------------------------------------------------- 1 | S9 LIB (group list integer) ==> list 2 | 3 | Group the elements of LIST in tuples of INTEGER elements 4 | each (except for the last tuple, which may contain fewer 5 | elements). Return a list of the resulting tuples. The 6 | elements appear in the output list in the same order as 7 | in the input list. 8 | 9 | INTEGER must be positive. 10 | 11 | (group '(1 2 3 4 5) 2) ==> ((1 2) (3 4) (5)) 12 | (group '(1 2 3 4 5) 5) ==> ((1 2 3 4 5)) 13 | -------------------------------------------------------------------------------- /help/gt: -------------------------------------------------------------------------------- 1 | eq -------------------------------------------------------------------------------- /help/hash-table-length: -------------------------------------------------------------------------------- 1 | make-hash-table -------------------------------------------------------------------------------- /help/hash-table-ref: -------------------------------------------------------------------------------- 1 | make-hash-table -------------------------------------------------------------------------------- /help/hash-table-removeb: -------------------------------------------------------------------------------- 1 | make-hash-table -------------------------------------------------------------------------------- /help/hash-table-setb: -------------------------------------------------------------------------------- 1 | make-hash-table -------------------------------------------------------------------------------- /help/hash-table-to-alist: -------------------------------------------------------------------------------- 1 | make-hash-table -------------------------------------------------------------------------------- /help/htmlify-char: -------------------------------------------------------------------------------- 1 | S9 LIB (htmlify-char char) ==> string 2 | (htmlify-string string) ==> string 3 | 4 | HTMLIFY-CHAR converts a char to a string that is save for 5 | inclusion in an HTML document. HTMLIFY-STRING does the 6 | same for a string. 7 | 8 | (htmlify-char #\<) ==> "<" 9 | (htmlify-string "<&>") ==> "<&>" 10 | -------------------------------------------------------------------------------- /help/htmlify-string: -------------------------------------------------------------------------------- 1 | htmlify-char -------------------------------------------------------------------------------- /help/hyper: -------------------------------------------------------------------------------- 1 | S9 LIB (hyper integer1 integer2 integer3) ==> integer 2 | 3 | Compute A hyper(N) B, where N=INTEGER1, A=INTEGER2, and B=INTEGER3. 4 | 5 | (hyper 4 3 3) ==> 7625597484987 6 | -------------------------------------------------------------------------------- /help/id: -------------------------------------------------------------------------------- 1 | S9 LIB (false object ...) ==> #f 2 | (id object) ==> object 3 | (true object ...) ==> #t 4 | 5 | (load-from-library "id.scm") 6 | 7 | ID returns the object passed to it. 8 | 9 | FALSE returns always #F and TRUE returns always #T, no matter which 10 | values are passed to them. 11 | 12 | (true) ==> #t 13 | (false 1 2 3) ==> #f 14 | (id 'whatever) ==> whatever 15 | -------------------------------------------------------------------------------- /help/if: -------------------------------------------------------------------------------- 1 | R4RS 4.1.5 (if ) ==> object 2 | (if ) ==> object 3 | 4 | Syntax: , , and may be arbitrary 5 | expressions. 6 | 7 | Semantics: An IF expression is evaluated as follows: first, 8 | is evaluated. If it yields a true value (see section see section 9 | 6.1 Booleans), then is evaluated and its value is 10 | returned. Otherwise is evaluated and its value is 11 | returned. If yields a false value and no is 12 | specified, then the result of the expression is unspecified. 13 | 14 | (if (> 3 2) 'yes 'no) ==> yes 15 | (if (> 2 3) 'yes 'no) ==> no 16 | (if (> 3 2) 17 | (- 3 2) 18 | (+ 3 2)) ==> 1 19 | -------------------------------------------------------------------------------- /help/implode: -------------------------------------------------------------------------------- 1 | S9 LIB (implode list) ==> symbol 2 | 3 | Implode a list of single-character symbols into a symbol. 4 | 5 | (implode '(b l a c k h o l e)) ==> blackhole 6 | -------------------------------------------------------------------------------- /help/incb: -------------------------------------------------------------------------------- 1 | pushb -------------------------------------------------------------------------------- /help/inexact-to-exact: -------------------------------------------------------------------------------- 1 | exact-to-inexact -------------------------------------------------------------------------------- /help/inexactp: -------------------------------------------------------------------------------- 1 | exactp -------------------------------------------------------------------------------- /help/initialize: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/input-portp: -------------------------------------------------------------------------------- 1 | R4RS 6.10 (input-port? object) ==> boolean 2 | (output-port? object) ==> boolean 3 | 4 | Returns #T if OBJECT is an input port or output port respectively, 5 | otherwise returns #F. 6 | -------------------------------------------------------------------------------- /help/instancep: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/integer-sqrt: -------------------------------------------------------------------------------- 1 | S9 LIB (integer-sqrt integer) ==> integer 2 | 3 | Compute the largest integer value that is not greater than the 4 | square root of INTEGER. 5 | 6 | (integer-sqrt 10) ==> 3 7 | -------------------------------------------------------------------------------- /help/integer-to-char: -------------------------------------------------------------------------------- 1 | char-to-integer -------------------------------------------------------------------------------- /help/integerp: -------------------------------------------------------------------------------- 1 | numberp -------------------------------------------------------------------------------- /help/intersection: -------------------------------------------------------------------------------- 1 | S9 LIB (intersection list ...) ==> list 2 | 3 | Compute the intersection of a number of sets. 4 | 5 | (intersection '(v w x) '(w x y) '(x y z)) ==> (x) 6 | -------------------------------------------------------------------------------- /help/iota: -------------------------------------------------------------------------------- 1 | S9 LIB (iota integer) ==> list 2 | (iota integer1 integer2) ==> list 3 | (iota* integer1 integer2) ==> list 4 | 5 | (load-from-library "iota.scm") 6 | 7 | IOTA creates a sequence of integers starting at 1 and ending 8 | at INTEGER (including both). When a second argument is passed 9 | to IOTA, the sequence returned by it will start at INTEGER1 10 | and ; end at INTEGER2 (again, including both). 11 | 12 | IOTA* differs from IOTA in two ways: it always takes two 13 | arguments and excludes INTEGER2 from the generated sequence. 14 | 15 | (iota 7) ==> (1 2 3 4 5 6 7) 16 | (iota 17 21) ==> (17 18 19 20 21) 17 | (iota* 17 21) ==> (17 18 19 20) 18 | (iota* 1 1) ==> () 19 | -------------------------------------------------------------------------------- /help/iotastar: -------------------------------------------------------------------------------- 1 | iota -------------------------------------------------------------------------------- /help/lcm: -------------------------------------------------------------------------------- 1 | gcd -------------------------------------------------------------------------------- /help/le: -------------------------------------------------------------------------------- 1 | eq -------------------------------------------------------------------------------- /help/leap-yearp: -------------------------------------------------------------------------------- 1 | S9 LIB (leap-year? integer) ==> boolean 2 | 3 | Return #T if INTEGER represents a leap year and otherwise return #F. 4 | 5 | (leap-year? 2000) ==> #t 6 | (leap-year? 2003) ==> #f 7 | -------------------------------------------------------------------------------- /help/length: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (length list) ==> integer 2 | 3 | Returns the length of list. 4 | 5 | (length '(a b c)) ==> 3 6 | (length '(a (b) (c d e))) ==> 3 7 | (length '()) ==> 0 8 | -------------------------------------------------------------------------------- /help/let-matcher: -------------------------------------------------------------------------------- 1 | define-matcher -------------------------------------------------------------------------------- /help/letslashcc: -------------------------------------------------------------------------------- 1 | S9 LIB (let/cc . ) ==> object 2 | 3 | (load-from-library "letcc.scm") 4 | 5 | Bind the current continuation to and evaluate with 6 | that binding in effect. 7 | 8 | (let/cc exit 9 | (letrec 10 | ((f (lambda (x) 11 | (cond ((null? x) 0) 12 | ((pair? x) (+ 1 (f (cdr x)))) 13 | (else (exit 'foo)))))) 14 | (f '(1 2 3 . 4)))) ==> foo 15 | -------------------------------------------------------------------------------- /help/letstar: -------------------------------------------------------------------------------- 1 | R4RS 4.2.2 (let* ) ==> object 2 | 3 | Syntax: should have the form 4 | 5 | (( ) ...), 6 | 7 | and should be a sequence of one or more expressions. 8 | 9 | Semantics: LET* is similar to LET, but the bindings are performed 10 | sequentially from left to right, and the region of a binding indicated 11 | by `( )' is that part of the LET* expression to the 12 | right of the binding. Thus the second binding is done in an environment 13 | in which the first binding is visible, and so on. 14 | 15 | (let ((x 2) (y 3)) 16 | (let* ((x 7) 17 | (z (+ x y))) 18 | (* z x))) ==> 70 19 | -------------------------------------------------------------------------------- /help/list: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (list object ...) ==> list 2 | 3 | Returns a newly allocated list of its arguments. 4 | 5 | (list 'a (+ 3 4) 'c) ==> (a 7 c) 6 | (list) ==> () 7 | -------------------------------------------------------------------------------- /help/list-copy: -------------------------------------------------------------------------------- 1 | S9 LIB (list-copy list) ==> list 2 | 3 | Copy the spine of a proper list, creating a fresh list with the 4 | same elements as the original list. 5 | 6 | (list-copy '(foo bar baz)) ==> (foo bar baz) 7 | -------------------------------------------------------------------------------- /help/list-ref: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (list-ref list integer) ==> obj 2 | 3 | Returns the INTEGER'th element of list. (This is the same as the 4 | car of (list-tail list INTEGER).) 5 | 6 | (list-ref '(a b c d) 2) ==> c 7 | -------------------------------------------------------------------------------- /help/list-tail: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (list-tail list integer) ==> list 2 | 3 | Returns the sublist of LIST obtained by omitting the first INTEGER 4 | elements. LIST-TAIL could be defined by 5 | 6 | (define (list-tail x k) 7 | (if (zero? k) 8 | x 9 | (list-tail (cdr x) (- k 1)))) 10 | -------------------------------------------------------------------------------- /help/list-to-record: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/list-to-set: -------------------------------------------------------------------------------- 1 | S9 LIB (list->set list) ==> list 2 | 3 | (load-from-library "list-to-set.scm") 4 | 5 | Convert list to set. A set is a list containing unique members. 6 | 7 | (list->set '(a b c b c)) ==> (a b c) 8 | -------------------------------------------------------------------------------- /help/list-to-stream: -------------------------------------------------------------------------------- 1 | make-stream -------------------------------------------------------------------------------- /help/list-to-string: -------------------------------------------------------------------------------- 1 | string-to-list -------------------------------------------------------------------------------- /help/list-to-vector: -------------------------------------------------------------------------------- 1 | vector-to-list -------------------------------------------------------------------------------- /help/listp: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (list? object) ==> boolean 2 | 3 | Returns #T if OBJECT is a list, otherwise returns #F. By definition, 4 | all lists have finite length and are terminated by the empty list. 5 | 6 | (list? '(a b c)) ==> #t 7 | (list? '()) ==> #t 8 | (list? '(a . b)) ==> #f 9 | (let ((x (list 'a))) 10 | (set-cdr! x x) 11 | (list? x)) ==> #f 12 | -------------------------------------------------------------------------------- /help/listq: -------------------------------------------------------------------------------- 1 | S9 LIB (listq object ...) ==> list 2 | 3 | LISTQ is like LIST, but quotes each OBJECT passed to it. 4 | Rationale: (list a b c) evaluates a, b, and c 5 | '(a b c) makes the list immutable 6 | `(a b c) may be inefficient 7 | (list 'a 'b 'c) is awkward 8 | 9 | (listq a (b c) d) ==> (a (b c) d) 10 | -------------------------------------------------------------------------------- /help/load: -------------------------------------------------------------------------------- 1 | R4RS 6.10.4 (load string) ==> unspecific 2 | 3 | STRING should be a file name naming an existing file containing 4 | Scheme source code. The LOAD procedure reads expressions and 5 | definitions from the file and evaluates them sequentially. It is 6 | unspecified whether the results of the expressions are printed. 7 | The LOAD procedure does not affect the values returned by 8 | CURRENT-INPUT-PORT and CURRENT-OUTPUT-PORT. LOAD returns an 9 | unspecified value. 10 | 11 | Rationale: For portability, LOAD must operate on source files. Its 12 | operation on other kinds of files necessarily varies among 13 | implementations. 14 | -------------------------------------------------------------------------------- /help/load-from-library: -------------------------------------------------------------------------------- 1 | S9fES (load-from-library string) ==> unspecific 2 | 3 | Locate the Scheme source file whose name is specified in STRING and 4 | load it. It is an error to specify a file that cannot be located. 5 | LOAD-FROM-LIBRARY uses LOCATE-FILE to locate a file and LOAD to 6 | load it. It is intended to load files from extension libraries that 7 | may be stored in a set of pre-defined locations. 8 | -------------------------------------------------------------------------------- /help/log: -------------------------------------------------------------------------------- 1 | exp -------------------------------------------------------------------------------- /help/loutify-char: -------------------------------------------------------------------------------- 1 | S9 LIB (loutify-char char) ==> string 2 | (loutify-string string) ==> string 3 | 4 | LOUTIFY-CHAR converts a char to a string that is save for 5 | inclusion in an Lout document. LOUTIFY-STRING does the 6 | same for a string. 7 | 8 | (loutify-char #\") ==> "\"\\\"\"" 9 | (loutify-string "\"x\"") ==> "\"\\\"x\\\"\"" 10 | -------------------------------------------------------------------------------- /help/loutify-string: -------------------------------------------------------------------------------- 1 | loutify-char -------------------------------------------------------------------------------- /help/lt: -------------------------------------------------------------------------------- 1 | eq -------------------------------------------------------------------------------- /help/macro-expand-1: -------------------------------------------------------------------------------- 1 | macro-expand -------------------------------------------------------------------------------- /help/make-instance: -------------------------------------------------------------------------------- 1 | define-class -------------------------------------------------------------------------------- /help/make-matcher: -------------------------------------------------------------------------------- 1 | define-matcher -------------------------------------------------------------------------------- /help/make-partitions: -------------------------------------------------------------------------------- 1 | S9 LIB (make-partitions integer) ==> list 2 | 3 | Create all partitions of a positive integer. A (number-theoretical) 4 | partition of a positive integer N is a set of integers whose sum is 5 | equal to N. E.g., the partitions of 3 are 3, 2+1, and 1+1+1. 6 | 7 | (make-partitions 4) ==> ((4) (3 1) (2 2) (2 1 1) (1 1 1 1)) 8 | -------------------------------------------------------------------------------- /help/make-queue: -------------------------------------------------------------------------------- 1 | queue -------------------------------------------------------------------------------- /help/make-string: -------------------------------------------------------------------------------- 1 | R4RS 6.7 (make-string integer) ==> string 2 | (make-string integer char) ==> string 3 | 4 | MAKE-STRING returns a newly allocated string of length INTEGER. 5 | If CHAR is given, then all elements of the string are initialized 6 | to CHAR, otherwise the contents of the string are unspecified. 7 | -------------------------------------------------------------------------------- /help/make-vector: -------------------------------------------------------------------------------- 1 | R4RS 6.8 (make-vector integer) ==> vector 2 | (make-vector integer object) ==> vector 3 | 4 | Returns a newly allocated vector of INTEGER elements. If a second 5 | argument is given, then each element is initialized to fill. 6 | Otherwise the initial content of each element is unspecified. 7 | -------------------------------------------------------------------------------- /help/mantissa: -------------------------------------------------------------------------------- 1 | exponent -------------------------------------------------------------------------------- /help/map-stream: -------------------------------------------------------------------------------- 1 | make-stream -------------------------------------------------------------------------------- /help/max: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (max number ...) ==> number 2 | (min number ...) ==> number 3 | 4 | These procedures return the maximum or minimum of their arguments. 5 | 6 | (max 3 4) ==> 4 ; exact 7 | (min 3 4.1) ==> 3.0 ; inexact 8 | 9 | Note: If any argument is inexact, then the result will also be 10 | inexact. 11 | -------------------------------------------------------------------------------- /help/member: -------------------------------------------------------------------------------- 1 | memq -------------------------------------------------------------------------------- /help/memp: -------------------------------------------------------------------------------- 1 | S9 LIB (memp procedure^2 object list) ==> list | #f 2 | 3 | Find the first tail X of LIST for which 4 | 5 | (procedure^2 object (car X)) 6 | 7 | holds. When no such tail exists, return #F. 8 | 9 | (memp char=? #\b '(#\a #\b #\c)) ==> (#\b #\c) 10 | -------------------------------------------------------------------------------- /help/memv: -------------------------------------------------------------------------------- 1 | memq -------------------------------------------------------------------------------- /help/merge: -------------------------------------------------------------------------------- 1 | S9 LIB (merge procedure^2 list1 list2) ==> list 2 | 3 | Merge the members of two lists into one. The next member to be 4 | pushed to the output list will always be the one satisfying 5 | 6 | (procedure^2 (car list1) (car list2)) 7 | 8 | The list moved to the output is removed from the input list. 9 | When one list is empty, input will be taken from the other 10 | one. 11 | 12 | When both LIST1 and LIST2 are sorted under PROCEDURE^2, so 13 | will be the output. When a single-element list is merged with 14 | a sorted list, the single element will be inserted at such a 15 | position that the order of the other list is preserved. 16 | 17 | (merge < '(1 3 5) '(2 4 6)) ==> (1 2 3 4 5 6) 18 | (merge < '(1 5 3) '(2 4 6)) ==> (1 2 5 3 4 6) 19 | (merge < '(3) '(1 2 4 5)) ==> (1 2 3 4 5) 20 | -------------------------------------------------------------------------------- /help/mergesort: -------------------------------------------------------------------------------- 1 | S9 LIB (mergesort procedure^2 list) ==> list 2 | 3 | Sort lists using the mergesort algorithm. PROCEDURE^2 is a 4 | binary predicate that describes the desired order. The original 5 | list is not changed. 6 | 7 | (mergesort <= '(5 3 7 9 1)) ==> (1 3 5 7 9) 8 | -------------------------------------------------------------------------------- /help/min: -------------------------------------------------------------------------------- 1 | max -------------------------------------------------------------------------------- /help/minus: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (- number ...) ==> number 2 | (/ number ...) ==> number 3 | 4 | With two or more arguments, these procedures return the difference 5 | or quotient of their arguments, associating to the left. With one 6 | argument, however, they return the additive or multiplicative inverse 7 | of their argument. 8 | 9 | (- 3 4) ==> -1 10 | (- 3 4 5) ==> -6 11 | (- 3) ==> -3 12 | (/ 3 4 5) ==> 0.15 13 | (/ 4) ==> 0.25 14 | 15 | -------------------------------------------------------------------------------- /help/mode-to-string: -------------------------------------------------------------------------------- 1 | S9 LIB (mode->string integer) ==> string 2 | 3 | Return a symbolic representation of the access mode specified in 4 | INTEGER. The resulting string is in the same format as used by 5 | the ls(1) Unix command. 6 | 7 | (mode->string #o5751) ==> "rwsr-x--t" 8 | -------------------------------------------------------------------------------- /help/module: -------------------------------------------------------------------------------- 1 | S9 LIB (module ...) ==> unspecific 2 | (using ( ...) ...) ==> object 3 | 4 | (load-from-library "simple-modules.scm") 5 | 6 | Simple modules. Inside of a MODULE expression, DEFINE defines 7 | a local object and DEFINE* defines a public object. names 8 | the module itself. 9 | 10 | Expressions inside of USING may use all 's that are 11 | being imported from the module . 12 | 13 | (begin ; Note: BEGIN is only needed for automatic testing 14 | (module math 15 | (define* (fact x) 16 | (if (= 0 x) 1 (* x (fact (- x 1)))))) 17 | (using math (fact) 18 | (fact 5))) ==> 120 19 | -------------------------------------------------------------------------------- /help/modulo: -------------------------------------------------------------------------------- 1 | quotient -------------------------------------------------------------------------------- /help/nase: -------------------------------------------------------------------------------- 1 | S9 LIB (nase string) ==> unspecific 2 | (nase) ==> unspecific 3 | 4 | The NASE procedure implements a Scheme-centric text editor. 5 | If specified, it loads the file STRING into an editing buffer. 6 | 7 | (nase "foo.scm") 8 | -------------------------------------------------------------------------------- /help/negativep: -------------------------------------------------------------------------------- 1 | zerop -------------------------------------------------------------------------------- /help/new-databaseb: -------------------------------------------------------------------------------- 1 | prolog -------------------------------------------------------------------------------- /help/newline: -------------------------------------------------------------------------------- 1 | R4RS 6.10.3 (newline) ==> unspecific 2 | (newline output-port) ==> unspecific 3 | 4 | Writes an end of line to OUTPUT-PORT. Exactly how this is done 5 | differs from one operating system to another. Returns an unspecified 6 | value. The OUTPUT-PORT argument may be omitted, in which case it 7 | defaults to the value returned by CURRENT-OUTPUT-PORT. 8 | -------------------------------------------------------------------------------- /help/not: -------------------------------------------------------------------------------- 1 | R4RS 6.1 (not object) ==> boolean 2 | 3 | NOT returns #T if OBJECT is false, and returns #F otherwise. 4 | 5 | (not #t) ==> #f 6 | (not 3) ==> #f 7 | (not (list 3)) ==> #f 8 | (not #f) ==> #t 9 | (not '()) ==> #f 10 | (not (list)) ==> #f 11 | (not 'nil) ==> #f 12 | -------------------------------------------------------------------------------- /help/nullp: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (null? object) ==> boolean 2 | 3 | Returns #T if OBJECT is the empty list, otherwise returns #F. 4 | -------------------------------------------------------------------------------- /help/number-of-bits: -------------------------------------------------------------------------------- 1 | integer-to-binary-string -------------------------------------------------------------------------------- /help/oddp: -------------------------------------------------------------------------------- 1 | zerop -------------------------------------------------------------------------------- /help/open-input-file: -------------------------------------------------------------------------------- 1 | R4RS 6.10 (open-input-file filename) ==> input-port 2 | 3 | Takes a string naming an existing file and returns an input port 4 | capable of delivering characters from the file. If the file cannot 5 | be opened, an error is signalled. 6 | -------------------------------------------------------------------------------- /help/open-output-file: -------------------------------------------------------------------------------- 1 | R4RS 6.10 (open-output-file filename) ==> output-port 2 | 3 | Takes a string naming an output file to be created and returns an 4 | output port capable of writing characters to a new file by that 5 | name. If the file cannot be opened, an error is signalled. If a 6 | file with the given name already exists, the effect is unspecified. 7 | -------------------------------------------------------------------------------- /help/opt-argp: -------------------------------------------------------------------------------- 1 | parse-optionsb -------------------------------------------------------------------------------- /help/opt-char: -------------------------------------------------------------------------------- 1 | parse-optionsb -------------------------------------------------------------------------------- /help/opt-type: -------------------------------------------------------------------------------- 1 | parse-optionsb -------------------------------------------------------------------------------- /help/opt-val: -------------------------------------------------------------------------------- 1 | parse-optionsb -------------------------------------------------------------------------------- /help/option: -------------------------------------------------------------------------------- 1 | parse-optionsb -------------------------------------------------------------------------------- /help/or: -------------------------------------------------------------------------------- 1 | R4RS 4.2.1 (or ...) ==> obj 2 | 3 | The s are evaluated from left to right, and the value 4 | of the first expression that evaluates to a true value (see section 5 | see section 6.1 Booleans) is returned. Any remaining expressions 6 | are not evaluated. If all expressions evaluate to false values, the 7 | value of the last expression is returned. If there are no expressions 8 | then #F is returned. 9 | 10 | (or (= 2 2) (> 2 1)) ==> #t 11 | (or (= 2 2) (< 2 1)) ==> #t 12 | (or #f #f #f) ==> #f 13 | (or (memq 'b '(a b c)) 14 | (quotient 3 0)) ==> (b c) 15 | -------------------------------------------------------------------------------- /help/output-portp: -------------------------------------------------------------------------------- 1 | input-portp -------------------------------------------------------------------------------- /help/pairp: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (pair? object) ==> boolean 2 | 3 | PAIR? returns #T if OBJECT is a pair, and otherwise returns #F. 4 | 5 | (pair? '(a . b)) ==> #t 6 | (pair? '(a b c)) ==> #t 7 | (pair? '()) ==> #f 8 | (pair? '#(a b)) ==> #f 9 | -------------------------------------------------------------------------------- /help/partition: -------------------------------------------------------------------------------- 1 | S9 LIB (partition proceduce^1 list) ==> (list_1 list_2) 2 | 3 | Partition a list into elements with and without a given property. 4 | The unary predicate P, which is given in the procedure argument, 5 | specifies the property. The returned value contains two lists, 6 | where the first one holds the elements satisfying the property 7 | and the second one the elements not satisfying the property. 8 | 9 | (partition even? '(1 2 3 4 5)) ==> ((2 4) (1 3 5)) 10 | -------------------------------------------------------------------------------- /help/permute: -------------------------------------------------------------------------------- 1 | S9 LIB (permute integer list) ==> list 2 | (permute* integer list) ==> list 3 | 4 | (load-from-library "permute.scm") 5 | 6 | Create k-permutations of the elements of the given list. K (the 7 | size of the permutations) is specified in the integer argument. 8 | PERMUTE creates permutations without repetition and PERMUTE* 9 | creates permutations with repetition. 10 | 11 | (permute 2 '(a b c)) ==> ((a b) (b a) (a c) 12 | (c a) (b c) (c b)) 13 | 14 | (permute* 2 '(a b c)) ==> ((a a) (a b) (a c) 15 | (b a) (b b) (b c) 16 | (c a) (c b) (c c)) 17 | -------------------------------------------------------------------------------- /help/permutestar: -------------------------------------------------------------------------------- 1 | permute -------------------------------------------------------------------------------- /help/plus: -------------------------------------------------------------------------------- 1 | R4RS 6.5.5 (+ number1 ...) ==> number 2 | (+) ==> number 3 | (* number1 ...) ==> number 4 | (*) ==> number 5 | 6 | These procedures return the sum or product of their arguments. 7 | 8 | (+ 3 4) ==> 7 9 | (+ 3) ==> 3 10 | (+) ==> 0 11 | (* 4) ==> 4 12 | (*) ==> 1 13 | -------------------------------------------------------------------------------- /help/popb: -------------------------------------------------------------------------------- 1 | pushb -------------------------------------------------------------------------------- /help/positivep: -------------------------------------------------------------------------------- 1 | zerop -------------------------------------------------------------------------------- /help/posp: -------------------------------------------------------------------------------- 1 | position -------------------------------------------------------------------------------- /help/posq: -------------------------------------------------------------------------------- 1 | position -------------------------------------------------------------------------------- /help/posv: -------------------------------------------------------------------------------- 1 | position -------------------------------------------------------------------------------- /help/pp: -------------------------------------------------------------------------------- 1 | pretty-print -------------------------------------------------------------------------------- /help/pp-file: -------------------------------------------------------------------------------- 1 | pretty-print -------------------------------------------------------------------------------- /help/pp-loop: -------------------------------------------------------------------------------- 1 | pretty-print -------------------------------------------------------------------------------- /help/pp-string: -------------------------------------------------------------------------------- 1 | pretty-print -------------------------------------------------------------------------------- /help/predicateb: -------------------------------------------------------------------------------- 1 | prolog -------------------------------------------------------------------------------- /help/print: -------------------------------------------------------------------------------- 1 | S9fES (print object ...) ==> unspecific 2 | 3 | Write the external representation of each given OBJECT to the port 4 | returned by CURRENT-OUTPUT-PORT. Use WRITE to write each external 5 | representation. Display one space character between adjacent objects. 6 | Display a newline sequence after the last object. PRINT with no 7 | arguments is equal to (NEWLINE). 8 | -------------------------------------------------------------------------------- /help/procedurep: -------------------------------------------------------------------------------- 1 | R4RS 6.9 (procedure? object) ==> boolean 2 | 3 | Returns #T if OBJECT is a procedure, otherwise returns #F. 4 | 5 | (procedure? car) ==> #t 6 | (procedure? 'car) ==> #f 7 | (procedure? (lambda (x) (* x x))) ==> #t 8 | (procedure? '(lambda (x) (* x x))) ==> #f 9 | -------------------------------------------------------------------------------- /help/programp: -------------------------------------------------------------------------------- 1 | S9 LIB (program? object) ==> boolean 2 | 3 | (load-from-library "programp.scm") 4 | 5 | Return #T, if OBJECT is a syntactically correct Scheme program. 6 | This program does not implement all of R4RS. Caveat utilitor. 7 | 8 | (program? '(let ((x 1)) (cons x x))) ==> #t 9 | -------------------------------------------------------------------------------- /help/proper-timep: -------------------------------------------------------------------------------- 1 | S9 LIB (proper-time? time-list) ==> boolean 2 | 3 | Return #T if the given TIME-LIST is a proper TIME-LIST as defined 4 | by the UNIX-TIME->TIME procedure. Otherwise return #F. 5 | 6 | (proper-time? '(3 1970 1 1 0 0 0)) ==> #t 7 | -------------------------------------------------------------------------------- /help/put-prop: -------------------------------------------------------------------------------- 1 | get-prop -------------------------------------------------------------------------------- /help/put-propb: -------------------------------------------------------------------------------- 1 | get-prop -------------------------------------------------------------------------------- /help/queens: -------------------------------------------------------------------------------- 1 | S9 LIB (queens n) ==> list 2 | 3 | Solve the N-Queens puzzle using AMK. All solutions for the 4 | given board size will be returned, where the offset in each 5 | list is an X position on the board and the value at that 6 | offset is the corresponding Y position. E.g., the board 7 | (2 0 3 1) would look like this: 8 | 9 | . . & . 3 10 | & . . . 2 11 | . . . & 1 12 | . & . . 0 13 | 0 1 2 3 14 | 15 | (queens 4) ==> ((2 0 3 1) (1 3 0 2)) 16 | -------------------------------------------------------------------------------- /help/query: -------------------------------------------------------------------------------- 1 | prolog -------------------------------------------------------------------------------- /help/queue-emptyp: -------------------------------------------------------------------------------- 1 | queue -------------------------------------------------------------------------------- /help/queueb: -------------------------------------------------------------------------------- 1 | queue -------------------------------------------------------------------------------- /help/quicksort: -------------------------------------------------------------------------------- 1 | S9 LIB (quicksort procecure^2 list) ==> list 2 | 3 | Sort lists using the Quicksort algorithm. PROCEDURE^2 is a 4 | binary procedure describing the desired order. The original 5 | list is not changed. 6 | 7 | (quicksort <= '(5 3 7 9 1)) ==> (1 3 5 7 9) 8 | -------------------------------------------------------------------------------- /help/r4rs-procedures: -------------------------------------------------------------------------------- 1 | S9 LIB (r4rs-syntax-objects) ==> list 2 | (s9fes-syntax-objects) ==> list 3 | (r4rs-procedures) ==> list 4 | (s9fes-procedures) ==> list 5 | (s9fes-extension-procedures) ==> list 6 | (s9fes-extension-symbols) ==> list 7 | 8 | (load-from-library "symbols.scm") 9 | 10 | Return lists of symbols bound the corresponding type of object. 11 | Note: only the R4RS symbols defined in S9fES are included here. 12 | Caveat Utilitor. 13 | 14 | (s9fes-syntax-objects) ==> () 15 | -------------------------------------------------------------------------------- /help/r4rs-syntax-objects: -------------------------------------------------------------------------------- 1 | r4rs-procedures -------------------------------------------------------------------------------- /help/random: -------------------------------------------------------------------------------- 1 | S9 LIB (random integer) ==> integer 2 | (random-state integer) ==> procedure 3 | 4 | (load-from-library "random.scm") 5 | 6 | RANDOM returns a random number in the range [0;INTEGER], where 7 | INTEGER may not be any larger than 2**19 = 524288. 8 | 9 | RANDOM-STATE returns a procedure that resembles RANDOM but uses 10 | a user-supplied seed instead of a default one. RANDOM can be passed 11 | a different seed by running: 12 | 13 | (set! random (random-state SEED)) 14 | 15 | RANDOM-STATE uses a 19-bit linear feedback shift register. Hence 16 | its limited range. 17 | 18 | (list (random 100) 19 | (random 100) 20 | (random 100)) ==> (5 47 68) 21 | -------------------------------------------------------------------------------- /help/random-sort: -------------------------------------------------------------------------------- 1 | S9 LIB (random-sort list) ==> list 2 | (random-sort list integer) ==> list 3 | 4 | Create a random permutation of LIST and return it. When INTEGER 5 | is specified, use it to initialize a random state (see RANDOM). 6 | When no seed or the same seed is specified, RANDOM-SORT will 7 | always deliver the same permutation. 8 | 9 | (random-sort '(1 2 3 4 5)) ==> (2 3 5 1 4) 10 | -------------------------------------------------------------------------------- /help/random-state: -------------------------------------------------------------------------------- 1 | random -------------------------------------------------------------------------------- /help/rbt-find: -------------------------------------------------------------------------------- 1 | make-rbt -------------------------------------------------------------------------------- /help/rbt-insert: -------------------------------------------------------------------------------- 1 | make-rbt -------------------------------------------------------------------------------- /help/rbt-rebuild: -------------------------------------------------------------------------------- 1 | make-rbt -------------------------------------------------------------------------------- /help/rbt-remove: -------------------------------------------------------------------------------- 1 | make-rbt -------------------------------------------------------------------------------- /help/re-match: -------------------------------------------------------------------------------- 1 | re-comp -------------------------------------------------------------------------------- /help/re-subst: -------------------------------------------------------------------------------- 1 | re-comp -------------------------------------------------------------------------------- /help/read-char: -------------------------------------------------------------------------------- 1 | R4RS 6.10.2 (read-char) ==> char | eof-object 2 | (read-char input-port) ==> char | eof-object 3 | 4 | Returns the next character available from the input port, updating 5 | the port to point to the following character. If no more characters 6 | are available, an end of file object is returned. INPUT-PORT may 7 | be omitted, in which case it defaults to the value returned by 8 | CURRENT-INPUT-PORT. 9 | -------------------------------------------------------------------------------- /help/read-file: -------------------------------------------------------------------------------- 1 | S9 LIB (read-file) ==> list 2 | (read-file input-port) ==> list 3 | 4 | Read a text file from an input port, return a list containing 5 | one string for each line read. When no INPUT-PORT is specified, 6 | read the current input port. 7 | 8 | (with-input-from-file "lib/read-file.scm" read-file) 9 | ==> [lots of lines] 10 | -------------------------------------------------------------------------------- /help/read-line: -------------------------------------------------------------------------------- 1 | S9 LIB (read-line) ==> string 2 | (read-line input-port) ==> string 3 | 4 | Read a line from an input port. When no INPUT-PORT is specified, 5 | read the current input port. 6 | 7 | (with-input-from-file "lib/read-line.scm" read-line) 8 | ==> "; Scheme 9 from Empty Space, Function Library" 9 | -------------------------------------------------------------------------------- /help/record-copy: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/record-equalp: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/record-ref: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/record-setb: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/record-signature: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/record-to-list: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/record-type-matches: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/recordp: -------------------------------------------------------------------------------- 1 | record -------------------------------------------------------------------------------- /help/rem-prop: -------------------------------------------------------------------------------- 1 | get-prop -------------------------------------------------------------------------------- /help/rem-propb: -------------------------------------------------------------------------------- 1 | get-prop -------------------------------------------------------------------------------- /help/remainder: -------------------------------------------------------------------------------- 1 | quotient -------------------------------------------------------------------------------- /help/remove: -------------------------------------------------------------------------------- 1 | S9 LIB (remove obj list) ==> list 2 | (remp procedure^1 list) ==> list 3 | (remq obj list) ==> list 4 | (remv obj list) ==> list 5 | 6 | (load-from-library "remove.scm") 7 | 8 | Remove elements from a list. REMP uses the unary predicate 9 | PROCEDURE^1 to describe the property of the elements to be 10 | removed. REMOVE uses EQUAL?, REMV uses EQV?, and REMQ uses 11 | EQ? to compare each element of LIST to OBJ. 12 | 13 | (remp number? '(a 1 b 2 c 3)) ==> (a b c) 14 | (remove '(b) '(a (b) (c) (b))) ==> (a (c)) 15 | (remq 'b '(a b c b d)) ==> (a c d) 16 | (remv 3 '(3 1 2 3 1)) ==> (1 2 1) 17 | -------------------------------------------------------------------------------- /help/remp: -------------------------------------------------------------------------------- 1 | remove -------------------------------------------------------------------------------- /help/remq: -------------------------------------------------------------------------------- 1 | remove -------------------------------------------------------------------------------- /help/remv: -------------------------------------------------------------------------------- 1 | remove -------------------------------------------------------------------------------- /help/replace: -------------------------------------------------------------------------------- 1 | S9 LIB (replace object-old object-new pair) ==> pair 2 | 3 | Replace elements of a pair. OBJECT-OLD is the object to be 4 | replaced and OBJECT-NEW is the new object. 5 | 6 | (replace '(x) '(y) '(lambda (x) y)) ==> (lambda (y) y) 7 | -------------------------------------------------------------------------------- /help/reverse: -------------------------------------------------------------------------------- 1 | R4RS 6.3 (reverse list) ==> list 2 | 3 | Returns a newly allocated list consisting of the elements of LIST 4 | in reverse order. 5 | 6 | (reverse '(a b c)) ==> (c b a) 7 | (reverse '(a (b c) d (e (f)))) ==> ((e (f)) d (b c) a) 8 | -------------------------------------------------------------------------------- /help/reverseb: -------------------------------------------------------------------------------- 1 | S9fES (reverse! list) ==> list 2 | 3 | Reverse LIST in situ, thereby destroying the original list. 4 | Return the reversed list. REVERSE! is much more efficient 5 | than REVERSE, but does not preserve the original list. When 6 | porting S9fES programs, REVERSE! can be replaced by REVERSE. 7 | 8 | NOTE: When reversing a list that is bound to a symbol, the 9 | symbol will thereafter be bound to the *last* member of the 10 | list. 11 | 12 | (define x '(1 2 3 4 5)) 13 | 14 | (reverse! x) ==> (5 4 3 2 1) 15 | x ==> (1) 16 | -------------------------------------------------------------------------------- /help/round: -------------------------------------------------------------------------------- 1 | floor -------------------------------------------------------------------------------- /help/runstar: -------------------------------------------------------------------------------- 1 | S9 LIB (run* (variable) query) ==> list 2 | (run* () query) ==> list 3 | 4 | (load-from-library "amk.scm") 5 | 6 | Run the given AMK (Another Micro Kanren) query and return its 7 | result, if any. See the book "Logic Programming in Scheme"[1] 8 | for an introduction to AMK. If a variable is given, return all 9 | values for that variable that satisfy the query. 10 | 11 | [1] http://www.lulu.com/shop/nils-m-holm/logic-programming-in-scheme/\ 12 | paperback/product-18693432.html 13 | 14 | (run* (q) (fresh (h t) 15 | (== q (list h t)) 16 | (appendo h t '(1 2 3)))) 17 | ==> ((() (1 2 3)) ((1) (2 3)) ((1 2) (3)) ((1 2 3) ())) 18 | -------------------------------------------------------------------------------- /help/s9e: -------------------------------------------------------------------------------- 1 | S9 LIB (s9e string