| @@ -27,7 +27,7 @@ doc)) cdaaar ((lst)) bounds-error ((seq index . msg)) even? ((n)) zero? ((n) · 26 unmodified lines |
| 27 | 27 | new-name)) random ((max)) reverse! ((lst)) eval ((x)) cdaadr ((lst)) u32 (((n 0))) cons ((first |
| 28 | 28 | second)) filter ((pred lst)) assq ((key lst)) del! ((table key)) when ((cond . body)) vec? ((v)) min ((v . rest)) cddaar ((lst)) num->str ((n |
| 29 | 29 | (:base 10))) io? ((term)) eof-object? ((v)) help ((topic (:print-header help-print-header) . rest)) mod ((a |
| 30 | | −n)) if ((cond then else)) p32 (((n 0))) io-read-lines ((io)) io-line ((io)) sym-set-doc ((symbol |
| 30 | +n)) if ((cond then . else)) p32 (((n 0))) io-read-lines ((io)) io-line ((io)) sym-set-doc ((symbol |
| 31 | 31 | doc-seq . formals-list)) macrocall? ((e)) trycatch ((try catch)) iterate ((fn zero n)) table-values ((ta)) macroexpand ((e)) caadr ((lst)) type-of ((v)) top-level-value ((sym)) defstruct ((name |
| 32 | 32 | docs… options… (slot-1 DEFAULT) slot-2 slot-3) |
| 33 | 33 | (name (:type vec) (:named T) (:constructor T) (:conc-name T) (:predicate T) . slots)) caadar ((lst)) foldl1 ((fn |
| @@ -73,8 +73,8 @@ sigs (:kind NIL) (:lpad ""))) sleep ((sec)) s16 (((n 0))) rune? ((v)) os-set · 39 unmodified lines |
| 73 | 73 | group error) "Errors and exception handling." io-eof? "Return `T` if `io` is currently in the \"end of file\" state, `NIL`\notherwise." path-exists? "Return `T` if `path` exists on the filesystem, `NIL` otherwise." cadddr "Shorthand for (car (cdr (cdr (cdr lst))))." (doc |
| 74 | 74 | group string) "Strings and runes." sort "Return a copy of the list sorted by comparing elements with the\ntwo-argument function `less-than?`.\n\nAn optional keyworded argument `:key` is used to provide a function to\nretrieve terms (the _key_) from the list items in order to perform\ncomparison. By default the terms compared are the list elements\nthemselves.\n\nExamples:\n\n ; simple sort (note: symbols > numbers)\n (sort '(1a 1 0 2b e 3) <)\n ; ↳ (0 1 3 1a 2b e)\n\n ; sort in lexicographical order (as strings)\n (sort '(1a 1 0 2b e 3) < :key str)\n ; ↳ (0 1 1a 2b 3 e)\n\n ; sort by type (note how the numbers stayed in the same order)\n (sort '(3 \"a\" 1 a #\\a 2)\n (λ (a b) (< (type-of a) (type-of b))))\n ; ↳ (3 1 2 #\\a \"a\" a)" fixnum? "Return `T` if `v` is of a fixnum type, `NIL` otherwise." exit "Terminate the process with the specified status. Does not return.\nThe status is expected to be a string in case of an error.\n\nExamples:\n\n (exit) ; exit with status 0 (nil on Plan 9)\n (exit \"error\") ; exit with status 1 (\"error\" on Plan 9)" __finish "A function called right before exit by the VM.\n\nThe exit `status` is either `NIL` or a string referring to an error\ncondition." caaar "Shorthand for (car (car (car lst)))." s32 "Construct a 32-bit signed number." u8 "Construct a 8-bit unsigned number." any "Return `T` if the predicate is true for _any_ element of the list,\n`NIL` otherwise.\n\nExample:\n\n ; is there any even number?\n (any even? '(1 3 5 7))\n ; ↳ NIL\n\n ; is there any string longer than one rune?\n (any (λ (s) (length> s 1))\n '(\"ab\" \"cd\" \"e\"))\n ; ↳ T" nthcdr "Return the reminder of the list after at most `n` elements, or `NIL`\nif the list is shorter.\n\nExamples:\n\n (def l '(a b c))\n (nthcdr l 1)\n ; ↳ (b c)\n (nthcdr l 2)\n ; ↳ (c)\n (nthcdr l 10)\n ; ↳ NIL" os-getenv "Return the value of the environment variable `name` or `NIL` if it's\nnot set." s8 "Construct a 8-bit signed number." io-close "Close the IO object.\n\nNo further operations on the IO object are possible, those will throw\nan exception if attempted. The only exception is `(io-filename io)`,\nwhich might be useful in some cases for debugging purposes.\n\nExamples:\n\n (def f (file \"/dev/random\"))\n (io-read f 'u8)\n ; ↳ #u8(123)\n (io-close f)\n (io-read f 'u8)\n ; ‼ I/O error: closed file" io-line! "Change the current line number of the IO object." num? "Return `T` if `v` is of a numerical type, `NIL` otherwise.\n\nNumerical types include floating point, fixnum, bignum, etc.\nNote: ironically, a NaN value is considered a number by this function\nsince it's only testing the _type_ of the value." assert "Throw an exception if `expr` evaluates to `NIL`. Return `T` in any\nother case.\n\nExamples:\n\n (def s \"abc\")\n (assert (= (length s) 3))\n ; ↳ T\n (assert (eq? (str-rune s 0) #\\x))\n ; ‼ assertion failed: ..." vec->list "Return the vector converted to a list.\n\nExamples:\n\n (vec->list #(1 2 a))\n ; ↳ (1 2 a)" 1+ "Equivalent to `(+ n 1)` - increment by one." throw "Raise an exception consisting of a tag and a value.\n\nThis exception can be caught by `catch`." positive? "Return `T` if `n` is greater than zero. Shorthand for `(> n 0)`." atan "Return the arc tangent of `y/x` in radians." *builtins* "VM instructions as closures." remprop "Remove a property value associated with the symbol." io-copy-until "Copy bytes from the source IO object to the destination until\nencountering the delimiting rune `r` and return the number of bytes\ncopied. The copied bytes include the delimiter." (doc |
| 75 | 75 | group list) "Working with lists." delete-file "Delete the file from the filesystem.\n\nThrows an IO error if file does not exist or it failed to be deleted." (doc |
| 76 | | −group compare) "Comparison operators." cdddar "Shorthand for (cdr (cdr (cdr (car lst))))." set-cdr! "Modify a cons cell (a list) in-place by putting `new-second` as its\nsecond element (tail of the list). Return the modified cons\ncell (list).\n\nExamples:\n\n (def q '(1 2 3 4 5))\n (set-cdr! q '(6 7))\n ; ↳ (1 6 7)\n q\n ; ↳ (1 6 7)" stacktrace "Return the current stack trace." eq? "Return `T` if `a` and `b` are the same object, `NIL` otherwise.\n\nExamples:\n\n (eq? 0.0 0)\n ; ↳ NIL\n\n (eq? 0 0)\n ; ↳ T\n\n (def a \"1\")\n (def b \"1\")\n (eq? a b)\n ; ↳ NIL\n\n (def a '(1))\n (def b '(1))\n (eq? a b)\n ; ↳ NIL" io->str "Return the data of the in-memory `io` buffer as a string." bound? "Return `T` if `sym` has a value associated with it, `NIL` otherwise.\n\nExamples:\n\n (bound? 'bound?)\n ; ↳ T\n\n (bound? 'doesnotcompute)\n ; ↳ NIL" list->vec "Return the list converted to a vector.\n\nExamples:\n\n (list->vec '(1 2 a))\n ; ↳ #(1 2 a)" odd? "Return `T` if `n` is an odd integer, `NIL` otherwise." def "Assign the function (first form) or the result of the expression\n(second form) to the identifier.\n\nDocumentation for the definition may also be supplied after `form` in\nthe same manner as with `defdoc`.\n\nFunction definitions themselves may contain other definitions internal\nto the function.\n\nExamples:\n\n ; a function with documentation (first form)\n (def (f x)\n \"Return the square of doubled `x`.\n\n Examples:\n\n (f 3)\n ; ↳ 36\"\n :doc-group cool-funcs ; documentation group for (help groups)\n :doc-see g ; reference another function in the documentation\n (def (g y) ; an internal function\n (+ y y))\n (* (g x) (g x)))\n (f 2)\n ; ↳ 16\n\n ; a variable (second form)\n (def x (length \"hello\"))\n x\n ; ↳ 5" list? "Return `T` if the value is either `NIL` or a cons cell, `NIL`\notherwise." *os-version* "The \"version\" of the operating system this StreetLISP VM executable\nwas built for.\n\nThe availability of the constant and its value depends on the\noperating system and is only provided for the user to see. No logic\nshould depend on it.\n\nExamples:\n\n *os-version*\n ; ↳ \"6.14.5-0-edge\" ; Alpine Linux kernel version" str-rep "Return the concatenation of the term formatted as a string, repeated\n`k` times.\n\nExamples:\n\n (str-rep \"oi\" 3)\n ; ↳ \"oioioi\"\n\n (str-rep #\\ы 5)\n ; ↳ \"ыыыыы\"\n\n (str-rep 'a 3)\n ; ↳ \"aaa\"\n\n (str-rep 1 5)\n ; ↳ \"11111\"" time "Display the elapsed time of evaluating `expr` to `*io-out*`, return\nthe result of the evaluated expression.\n\nExamples:\n\n (time (begin (sleep 0.1) 12345))\n ; ‼ Elapsed time: 0.10013356 seconds\n ; ↳ 12345" size-of "Return the size of the value in bytes, if applicable.\n\nWorks only with C integer types, arrays, strings and in-memory\nbuffers.\n\nExamples:\n\n (size-of \"hello\")\n ; ↳ 5\n\n (size-of (arr 'u32 1 2 3))\n ; ↳ 12\n\n (def b (buffer))\n (io-write b \"hello\")\n (size-of b)\n ; ↳ 5" sym "Return a symbol with the name being the concatenation of terms\nformatted as strings.\n\nThis is equivalent to `(sym (str …))`.\n\nExamples:\n\n (sym \"a\" 'b 1)\n ; ↳ ab1" tanh "Return the hyperbolic tangent of `x`." for "Call the function `f` with a single integer argument, starting from\n`min` and ending with `max`.\n\nExamples:\n\n (for 0 2 (λ (i) (print (- 2 i))))\n ; ‼ 210" begin "Evaluate the expressions in order and return the result of the last\nexpression.\n\nExamples:\n\n (if 1\n (begin (print 1)\n (newline)\n 'ignored\n 'done)\n (begin (print 0)\n (newline)\n 'else))\n ; ‼ 1\n ; ↳ done" const? "Return `T` if the term refers to a constant, `NIL` otherwise.\n\nConstants cannot be modified with `set!`. Trying to do so will result\nin an exception.\n\nExamples:\n\n (const? 12345) ; a number\n ; ↳ T\n\n (const? 'const?) ; a function\n ; ↳ NIL\n\n (const? 'pi) ; a mathematical constant\n ; ↳ T" str-trim "Return the portion of the string with all leading runes satisfying\n`lead-pred` (and trailing runes satisfying `trail-pred`) removed.\n\nWithout predicates explicitly specified, `str-trim` will remove\nwhitespace from both sides of the string.\n\nPass `NIL` as the predicate to disable trimming on either side.\n\nExamples:\n\n (str-trim \" \\nhello\\t\\v\")\n ; ↳ \"hello\"\n\n (str-trim \" \\nhello\\t\\v\"\n (λ (r) (str-find \" \\v\" r)))\n ; ↳ \"\\nhello\\t\"\n\n (str-trim \"123abc!456def\"\n rune-numeric?\n rune-alphabetic?)\n ; ↳ \"abc!456\"" io-pos! "Change the current absolute position within the IO object in bytes,\nreturn the resulting position.\n\nExamples:\n\n (def f (buffer))\n (io-write f \"hello, world!\")\n (io-pos! f 64)\n ; ↳ 13\n (io-pos! f 7)\n ; ↳ 7\n (read f)\n ; ↳ world!" return "Return from the function with the specified value as the result.\n\nExamples:\n\n (def (f x) (when (not x)\n (return 0))\n (princ \"hi\")\n (newline)\n 1)\n (f 'a)\n ; ‼ hi\n ; ↳ 1\n (f NIL)\n ; ↳ 0" *stderr* "Standard error output IO stream." tan "Return the tangent of `r`, where `r` is given in radians." table "Construct a table from keys from the arguments.\n\nEvery two arguments are expected to be a key and a value associated\nwith that key.\n\nExamples:\n\n (table)\n ; ↳ #table()\n\n (table 'a 1 'b 2)\n ; ↳ #table(a 1 b 2)" __rcscript "Execute, if exists, the user's \"run commands\" file.\n\nThe file path is predefined and depends on the OS:\n\n * `$home/lib/slrc` on Plan 9\n * `$HOME/.slrc` on other operating systems\n\nIt is automatically loaded by StreetLISP when running in interactive\nmode. The user may wish to use this file to change the look of the\nprompt, load additional functionality they want to use without having\nto do the process manually each time, and so on." doc-group "Define documentation for a group." cdaaar "Shorthand for (cdr (car (car (car lst))))." bounds-error "Raise a bounds error exception." even? "Return `T` if `n` is an even integer, `NIL` otherwise." *properties* "All properties of symbols recorded with `putprop` are recorded in this\ntable." zero? "Return `T` if `n` is zero. Shorthand for `(= n 0)`." proper-list? "Return `T` is the value is a proper list. That is, a non-circular\nlist with the last element being `NIL`, as opposed to a dotted list.\n\nExamples:\n\n ; empty list\n (proper-list? NIL)\n ; ↳ T\n\n ; a list with one element\n (proper-list? '(1))\n ; ↳ T\n\n ; a pair, cdr of the cell is 2\n (proper-list? '(1 . 2))\n ; ↳ NIL\n\n ; on a circular list\n (def l '(1))\n (set-cdr! l l)\n ; ↳ #0=(1 . #0#)\n (length l)\n ; ↳ +inf.0\n (proper-list? l)\n ; ↳ NIL" io-filename! "Change the filename of the IO object, return the new filename.\n\nChanging the filename does not cause any side effects. The filename\nis purely informative and does not necessarily reflect the actual\npath.\n\nExamples:\n\n (def f (buffer))\n (io-filename b)\n ; ↳ \"\"\n (io-filename! b \"new name\") ; change the filename\n ; ↳ \"new name\"\n (io-filename b)\n ; ↳ \"new name\"" random "Return a random number in the range `[0, max]` (inclusive).\n\nThe result is either an integer or a floating point number, depending\non the type of the `max` argument.\n\nExamples:\n\n (random 1)\n ; ↳ 1\n\n (random 1.0)\n ; ↳ 0.69517" *directory-separator* "OS-specific path separator.\n\nIt is preferred over hardcoded `\"/\"`, for portability." reverse! "Return the list with its elements in reverse order.\n\nThe original list may be modified by this function since it's a\ndestructive operation.\n\nExamples:\n\n (def a '(1 2 3))\n (reverse! a)\n ; ↳ (3 2 1)\n a\n ; ↳ (1) ; original list has been modified in-place" eval "Evaluate expression.\n\nExamples:\n\n (eval '(begin (set! x 1 y 2) (+ x y)))\n ; ↳ 3\n x\n ; ↳ 1\n y\n ; ↳ 2" cdaadr "Shorthand for (cdr (car (car (cdr lst))))." u32 "Construct a 32-bit unsigned number." cons "Return a cons cell containing two arguments.\n\nExamples:\n\n (cons 1 2)\n ; ↳ (1 . 2)\n\n (cons 1 '(2))\n ; ↳ (1 2)\n\n (cons 1 (cons 2 (cons 3 NIL)))\n ; ↳ (1 2 3)" filter "Return a copy of the list with only the elements of the original\nthat satisfy the predicate.\n\nExamples:\n\n (filter odd? '(0 1 2 3 4))\n ; ↳ (1 3)" assq "Return a pair of a matching key and the associated value, or `NIL` if\nnone matched. Keys are compared using `eq?`." most-positive-fixnum "A constant integer closest to positive infinity that can be\nrepresented by fixnum type on this particular platform." del! "Remove any existing mapping for `key` and return the table.\n\nExamples:\n\n (def t #table(a 1 b 2))\n (del! t 'c)\n ; ↳ #table(b 2 a 1)\n (del! t 'b)\n ; ↳ #table(a 1)\n t\n ; ↳ #table(a 1)" when "Shorthand for `(if cond body NIL)`.\n\nExamples:\n\n (when (eq? cmd 'exit)\n (princ \"exiting!\")\n (newline)\n (exit))" vec? "Return `T` if `v` is a vector, `NIL` otherwise." min "Return the smallest among the arguments.\n\nExamples:\n\n (min 3 1 9 4)\n ; ↳ 1\n\n (min 'c 'h 'z 'a)\n ; ↳ a\n\n (min \"t\" \"g\" \"a\")\n ; ↳ \"a\"" cddaar "Shorthand for (cdr (cdr (car (car lst))))." num->str "Return the number formatted as a string.\n\nFloating point numbers can only be formatted in base 10. Bignums are\nsupported with bases 2, 4, 8, 10, 16 and 32. The rest of the\nnumerical types are valid for any base from 2 to 36.\n\nNote: unlike other LISP dialects, StreetLISP's base-32 encoding is\ndone according to RFC 4648.\n\nExamples:\n\n (num->str 65535 :base 16)\n ; ↳ \"FFFF\"\n\n (num->str (s8 -7))\n ; ↳ \"-7\"" io? "Return `T` if `term` is of `io` type, `NIL` otherwise." eof-object? "Return `T` if the argument is `#<eof>`, `NIL` otherwise.\n\nThis object is returned by I/O functions to signal end of file,\nwhere applicable." help "Display documentation for a specific term or group of terms, if\navailable.\n\nAn optional symbol `group` is used to query for documentation on a\ngroup instead of a single term. All available documentation groups\ncan be displayed with `(help groups)`.\n\nAsterisk can be added to the beginning and/or end of the term in order\nto list the matching terms defined in the current environment. This\ncan be useful to recall a function's name.\n\nExamples:\n\n (help str?) ; show documentation for str?\n (help groups) ; show documentation groups\n (help type group) ; list items for dealing with types\n (help group type) ; same as ^\n (help str->*) ; find functions converting from strings\n (help *->str) ; find functions converting to strings\n (help *num*) ; find anything related to numbers" (doc |
| 77 | | −group array) "Arrays and vectors." mod "Return the remainder of the Euclidean division `a/n`.\n\nExamples:\n\n (mod 10 3)\n ; ↳ 1\n\n (mod -10 3)\n ; ↳ 2\n\n (mod -10 -3)\n ; ↳ 2\n\n (mod 10 -3)\n ; ↳ 1" if "Return the result of `then` if `cond` evaluated as \"true\", `else`\notherwise.\n\nThe `else` is not optional unlike in many other LISP implementations.\nPrimary purpose is to spot errors involving wrong parenthesis\nplacement. Another reason is to force a certain coding style.\n\nExamples:\n\n (def x '(1))\n (if x 'yes 0)\n ; ↳ yes\n (if (str? x) 1 'no)\n ; ↳ no" p32 "Construct a 32-bit abstract pointer value." io-read-lines "Return a list of lines read from the IO object until it ran out of\ndata.\n\nThe file is split into lines by `#\\linefeed`. Each string will have\nthe character, except the last line if EOF has been reached\nbeforehand.\n\nExamples:\n\n ; read current process' segments on Plan 9\n (def seg (file (str \"/proc/\" (getpid) \"/segment\")))\n (io-read-lines seg)\n ; ↳ (\"Stack 1feff0000 1ffff0000 1\\n\"\n \"Text R 10000 70000 1\\n\"\n \"Data 70000 d0000 1\\n\"\n \"Bss d0000 1a0000 1\\n\"\n \"Bss 1fcff0000 1feff0000 1\\n\"\n \"Bss 1faff0000 1fcff0000 1\\n\")" io-line "Return the current line number of the IO object.\n\nLine number is purely informative and is only being automatically\nupdated with the files opened for reading. If the cursor position is\nchanged via `io-skip` or `io-pos!`, the behavior is undefined." sym-set-doc "Set the documentation for the symbol." macrocall? "Return the macro application function if `e` refers to a macro call,\n`NIL` otherwise.\n\nExamples:\n\n (macrocall? '(car NIL))\n ; ↳ NIL\n\n (macrocall? '(let ((x 1)) 2))\n ; ↳ #fn(...)" trycatch "Return the result of evaluation of the expression `try` or, if an\nexception has been thrown, the one-argument function `catch`.\n\nExamples:\n\n (trycatch (+ 1 2) (λ (e) e))\n ; ↳ 3\n (trycatch (+ 1 NIL) (λ (e) e))\n ; ↳ (type-error num NIL)" (doc |
| 76 | +group compare) "Comparison operators." cdddar "Shorthand for (cdr (cdr (cdr (car lst))))." set-cdr! "Modify a cons cell (a list) in-place by putting `new-second` as its\nsecond element (tail of the list). Return the modified cons\ncell (list).\n\nExamples:\n\n (def q '(1 2 3 4 5))\n (set-cdr! q '(6 7))\n ; ↳ (1 6 7)\n q\n ; ↳ (1 6 7)" stacktrace "Return the current stack trace." eq? "Return `T` if `a` and `b` are the same object, `NIL` otherwise.\n\nExamples:\n\n (eq? 0.0 0)\n ; ↳ NIL\n\n (eq? 0 0)\n ; ↳ T\n\n (def a \"1\")\n (def b \"1\")\n (eq? a b)\n ; ↳ NIL\n\n (def a '(1))\n (def b '(1))\n (eq? a b)\n ; ↳ NIL" io->str "Return the data of the in-memory `io` buffer as a string." bound? "Return `T` if `sym` has a value associated with it, `NIL` otherwise.\n\nExamples:\n\n (bound? 'bound?)\n ; ↳ T\n\n (bound? 'doesnotcompute)\n ; ↳ NIL" list->vec "Return the list converted to a vector.\n\nExamples:\n\n (list->vec '(1 2 a))\n ; ↳ #(1 2 a)" odd? "Return `T` if `n` is an odd integer, `NIL` otherwise." def "Assign the function (first form) or the result of the expression\n(second form) to the identifier.\n\nDocumentation for the definition may also be supplied after `form` in\nthe same manner as with `defdoc`.\n\nFunction definitions themselves may contain other definitions internal\nto the function.\n\nExamples:\n\n ; a function with documentation (first form)\n (def (f x)\n \"Return the square of doubled `x`.\n\n Examples:\n\n (f 3)\n ; ↳ 36\"\n :doc-group cool-funcs ; documentation group for (help groups)\n :doc-see g ; reference another function in the documentation\n (def (g y) ; an internal function\n (+ y y))\n (* (g x) (g x)))\n (f 2)\n ; ↳ 16\n\n ; a variable (second form)\n (def x (length \"hello\"))\n x\n ; ↳ 5" list? "Return `T` if the value is either `NIL` or a cons cell, `NIL`\notherwise." *os-version* "The \"version\" of the operating system this StreetLISP VM executable\nwas built for.\n\nThe availability of the constant and its value depends on the\noperating system and is only provided for the user to see. No logic\nshould depend on it.\n\nExamples:\n\n *os-version*\n ; ↳ \"6.14.5-0-edge\" ; Alpine Linux kernel version" str-rep "Return the concatenation of the term formatted as a string, repeated\n`k` times.\n\nExamples:\n\n (str-rep \"oi\" 3)\n ; ↳ \"oioioi\"\n\n (str-rep #\\ы 5)\n ; ↳ \"ыыыыы\"\n\n (str-rep 'a 3)\n ; ↳ \"aaa\"\n\n (str-rep 1 5)\n ; ↳ \"11111\"" time "Display the elapsed time of evaluating `expr` to `*io-out*`, return\nthe result of the evaluated expression.\n\nExamples:\n\n (time (begin (sleep 0.1) 12345))\n ; ‼ Elapsed time: 0.10013356 seconds\n ; ↳ 12345" size-of "Return the size of the value in bytes, if applicable.\n\nWorks only with C integer types, arrays, strings and in-memory\nbuffers.\n\nExamples:\n\n (size-of \"hello\")\n ; ↳ 5\n\n (size-of (arr 'u32 1 2 3))\n ; ↳ 12\n\n (def b (buffer))\n (io-write b \"hello\")\n (size-of b)\n ; ↳ 5" sym "Return a symbol with the name being the concatenation of terms\nformatted as strings.\n\nThis is equivalent to `(sym (str …))`.\n\nExamples:\n\n (sym \"a\" 'b 1)\n ; ↳ ab1" tanh "Return the hyperbolic tangent of `x`." for "Call the function `f` with a single integer argument, starting from\n`min` and ending with `max`.\n\nExamples:\n\n (for 0 2 (λ (i) (print (- 2 i))))\n ; ‼ 210" begin "Evaluate the expressions in order and return the result of the last\nexpression.\n\nExamples:\n\n (if 1\n (begin (print 1)\n (newline)\n 'ignored\n 'done)\n (print 0)\n (newline)\n 'else)\n ; ‼ 1\n ; ↳ done" const? "Return `T` if the term refers to a constant, `NIL` otherwise.\n\nConstants cannot be modified with `set!`. Trying to do so will result\nin an exception.\n\nExamples:\n\n (const? 12345) ; a number\n ; ↳ T\n\n (const? 'const?) ; a function\n ; ↳ NIL\n\n (const? 'pi) ; a mathematical constant\n ; ↳ T" str-trim "Return the portion of the string with all leading runes satisfying\n`lead-pred` (and trailing runes satisfying `trail-pred`) removed.\n\nWithout predicates explicitly specified, `str-trim` will remove\nwhitespace from both sides of the string.\n\nPass `NIL` as the predicate to disable trimming on either side.\n\nExamples:\n\n (str-trim \" \\nhello\\t\\v\")\n ; ↳ \"hello\"\n\n (str-trim \" \\nhello\\t\\v\"\n (λ (r) (str-find \" \\v\" r)))\n ; ↳ \"\\nhello\\t\"\n\n (str-trim \"123abc!456def\"\n rune-numeric?\n rune-alphabetic?)\n ; ↳ \"abc!456\"" io-pos! "Change the current absolute position within the IO object in bytes,\nreturn the resulting position.\n\nExamples:\n\n (def f (buffer))\n (io-write f \"hello, world!\")\n (io-pos! f 64)\n ; ↳ 13\n (io-pos! f 7)\n ; ↳ 7\n (read f)\n ; ↳ world!" return "Return from the function with the specified value as the result.\n\nExamples:\n\n (def (f x) (when (not x)\n (return 0))\n (princ \"hi\")\n (newline)\n 1)\n (f 'a)\n ; ‼ hi\n ; ↳ 1\n (f NIL)\n ; ↳ 0" *stderr* "Standard error output IO stream." tan "Return the tangent of `r`, where `r` is given in radians." table "Construct a table from keys from the arguments.\n\nEvery two arguments are expected to be a key and a value associated\nwith that key.\n\nExamples:\n\n (table)\n ; ↳ #table()\n\n (table 'a 1 'b 2)\n ; ↳ #table(a 1 b 2)" __rcscript "Execute, if exists, the user's \"run commands\" file.\n\nThe file path is predefined and depends on the OS:\n\n * `$home/lib/slrc` on Plan 9\n * `$HOME/.slrc` on other operating systems\n\nIt is automatically loaded by StreetLISP when running in interactive\nmode. The user may wish to use this file to change the look of the\nprompt, load additional functionality they want to use without having\nto do the process manually each time, and so on." doc-group "Define documentation for a group." cdaaar "Shorthand for (cdr (car (car (car lst))))." bounds-error "Raise a bounds error exception." even? "Return `T` if `n` is an even integer, `NIL` otherwise." *properties* "All properties of symbols recorded with `putprop` are recorded in this\ntable." zero? "Return `T` if `n` is zero. Shorthand for `(= n 0)`." proper-list? "Return `T` is the value is a proper list. That is, a non-circular\nlist with the last element being `NIL`, as opposed to a dotted list.\n\nExamples:\n\n ; empty list\n (proper-list? NIL)\n ; ↳ T\n\n ; a list with one element\n (proper-list? '(1))\n ; ↳ T\n\n ; a pair, cdr of the cell is 2\n (proper-list? '(1 . 2))\n ; ↳ NIL\n\n ; on a circular list\n (def l '(1))\n (set-cdr! l l)\n ; ↳ #0=(1 . #0#)\n (length l)\n ; ↳ +inf.0\n (proper-list? l)\n ; ↳ NIL" io-filename! "Change the filename of the IO object, return the new filename.\n\nChanging the filename does not cause any side effects. The filename\nis purely informative and does not necessarily reflect the actual\npath.\n\nExamples:\n\n (def f (buffer))\n (io-filename b)\n ; ↳ \"\"\n (io-filename! b \"new name\") ; change the filename\n ; ↳ \"new name\"\n (io-filename b)\n ; ↳ \"new name\"" random "Return a random number in the range `[0, max]` (inclusive).\n\nThe result is either an integer or a floating point number, depending\non the type of the `max` argument.\n\nExamples:\n\n (random 1)\n ; ↳ 1\n\n (random 1.0)\n ; ↳ 0.69517" *directory-separator* "OS-specific path separator.\n\nIt is preferred over hardcoded `\"/\"`, for portability." reverse! "Return the list with its elements in reverse order.\n\nThe original list may be modified by this function since it's a\ndestructive operation.\n\nExamples:\n\n (def a '(1 2 3))\n (reverse! a)\n ; ↳ (3 2 1)\n a\n ; ↳ (1) ; original list has been modified in-place" eval "Evaluate expression.\n\nExamples:\n\n (eval '(begin (set! x 1 y 2) (+ x y)))\n ; ↳ 3\n x\n ; ↳ 1\n y\n ; ↳ 2" cdaadr "Shorthand for (cdr (car (car (cdr lst))))." u32 "Construct a 32-bit unsigned number." cons "Return a cons cell containing two arguments.\n\nExamples:\n\n (cons 1 2)\n ; ↳ (1 . 2)\n\n (cons 1 '(2))\n ; ↳ (1 2)\n\n (cons 1 (cons 2 (cons 3 NIL)))\n ; ↳ (1 2 3)" filter "Return a copy of the list with only the elements of the original\nthat satisfy the predicate.\n\nExamples:\n\n (filter odd? '(0 1 2 3 4))\n ; ↳ (1 3)" assq "Return a pair of a matching key and the associated value, or `NIL` if\nnone matched. Keys are compared using `eq?`." most-positive-fixnum "A constant integer closest to positive infinity that can be\nrepresented by fixnum type on this particular platform." del! "Remove any existing mapping for `key` and return the table.\n\nExamples:\n\n (def t #table(a 1 b 2))\n (del! t 'c)\n ; ↳ #table(b 2 a 1)\n (del! t 'b)\n ; ↳ #table(a 1)\n t\n ; ↳ #table(a 1)" when "Shorthand for `(if cond body NIL)`.\n\nExamples:\n\n (when (eq? cmd 'exit)\n (princ \"exiting!\")\n (newline)\n (exit))" vec? "Return `T` if `v` is a vector, `NIL` otherwise." min "Return the smallest among the arguments.\n\nExamples:\n\n (min 3 1 9 4)\n ; ↳ 1\n\n (min 'c 'h 'z 'a)\n ; ↳ a\n\n (min \"t\" \"g\" \"a\")\n ; ↳ \"a\"" cddaar "Shorthand for (cdr (cdr (car (car lst))))." num->str "Return the number formatted as a string.\n\nFloating point numbers can only be formatted in base 10. Bignums are\nsupported with bases 2, 4, 8, 10, 16 and 32. The rest of the\nnumerical types are valid for any base from 2 to 36.\n\nNote: unlike other LISP dialects, StreetLISP's base-32 encoding is\ndone according to RFC 4648.\n\nExamples:\n\n (num->str 65535 :base 16)\n ; ↳ \"FFFF\"\n\n (num->str (s8 -7))\n ; ↳ \"-7\"" io? "Return `T` if `term` is of `io` type, `NIL` otherwise." eof-object? "Return `T` if the argument is `#<eof>`, `NIL` otherwise.\n\nThis object is returned by I/O functions to signal end of file,\nwhere applicable." help "Display documentation for a specific term or group of terms, if\navailable.\n\nAn optional symbol `group` is used to query for documentation on a\ngroup instead of a single term. All available documentation groups\ncan be displayed with `(help groups)`.\n\nAsterisk can be added to the beginning and/or end of the term in order\nto list the matching terms defined in the current environment. This\ncan be useful to recall a function's name.\n\nExamples:\n\n (help str?) ; show documentation for str?\n (help groups) ; show documentation groups\n (help type group) ; list items for dealing with types\n (help group type) ; same as ^\n (help str->*) ; find functions converting from strings\n (help *->str) ; find functions converting to strings\n (help *num*) ; find anything related to numbers" (doc |
| 77 | +group array) "Arrays and vectors." mod "Return the remainder of the Euclidean division `a/n`.\n\nExamples:\n\n (mod 10 3)\n ; ↳ 1\n\n (mod -10 3)\n ; ↳ 2\n\n (mod -10 -3)\n ; ↳ 2\n\n (mod 10 -3)\n ; ↳ 1" if "Return the result of `then` if `cond` evaluated as \"true\", `else`\notherwise.\n\nThe `else` is not optional unlike in many other LISP implementations.\nPrimary purpose is to spot errors involving wrong parenthesis\nplacement. Another reason is to force a certain coding style.\n\nExamples:\n\n (def x '(1))\n (if x (begin (print \"yep!\") (newline) 'yes) 0)\n ; ‼ yep!\n ; ↳ yes\n (if (str? x) 1 (print \"nope!\") (newline) 'no)\n ; ‼ nope!\n ; ↳ no" p32 "Construct a 32-bit abstract pointer value." io-read-lines "Return a list of lines read from the IO object until it ran out of\ndata.\n\nThe file is split into lines by `#\\linefeed`. Each string will have\nthe character, except the last line if EOF has been reached\nbeforehand.\n\nExamples:\n\n ; read current process' segments on Plan 9\n (def seg (file (str \"/proc/\" (getpid) \"/segment\")))\n (io-read-lines seg)\n ; ↳ (\"Stack 1feff0000 1ffff0000 1\\n\"\n \"Text R 10000 70000 1\\n\"\n \"Data 70000 d0000 1\\n\"\n \"Bss d0000 1a0000 1\\n\"\n \"Bss 1fcff0000 1feff0000 1\\n\"\n \"Bss 1faff0000 1fcff0000 1\\n\")" io-line "Return the current line number of the IO object.\n\nLine number is purely informative and is only being automatically\nupdated with the files opened for reading. If the cursor position is\nchanged via `io-skip` or `io-pos!`, the behavior is undefined." sym-set-doc "Set the documentation for the symbol." macrocall? "Return the macro application function if `e` refers to a macro call,\n`NIL` otherwise.\n\nExamples:\n\n (macrocall? '(car NIL))\n ; ↳ NIL\n\n (macrocall? '(let ((x 1)) 2))\n ; ↳ #fn(...)" trycatch "Return the result of evaluation of the expression `try` or, if an\nexception has been thrown, the one-argument function `catch`.\n\nExamples:\n\n (trycatch (+ 1 2) (λ (e) e))\n ; ↳ 3\n (trycatch (+ 1 NIL) (λ (e) e))\n ; ↳ (type-error num NIL)" (doc |
| 78 | 78 | group builtin) "Built-in operators." iterate "Return the list of length `n` containing results of applying function\n`fn` to `zero`, 0 through `n` times.\n\nThe result is of form\n\n [zero (fn zero) (fn (fn zero)) (fn (fn (fn zero))) …]\n\nExamples:\n\n (iterate 1+ 5 3)\n ; ↳ (5 6 7)\n\n (iterate (λ (x) (* x x)) 2 5)\n ; ↳ (2 4 16 256 65536)\n\n (iterate (λ (s) (str-sub s 1)) \"hello\" 5)\n ; ↳ (\"hello\" \"ello\" \"llo\" \"lo\" \"o\")" *syntax-environment* "Table containing macro definitions.\n\nThe keys are macro names, the values are their application functions." table-values "Return the list of all values of the table.\n\nExamples:\n\n (def t #table(a 1 b 2 c 1))\n (table-values t)\n ; ↳ (1 2 1)" macroexpand "Return a fully macro-expanded expression.\n\nExpansion will continue until no more macro calls are left.\n\nExamples:\n\n (let ((a 3) (b 4) (c 5))\n (macroexpand `(let* {[x ,a] [y ,b]} (+ x y ,c))))\n ; ↳ ((λ (x)\n ((λ (y)\n (+ x y 5))\n 4))\n 3)" caadr "Shorthand for (car (car (cdr lst)))." type-of "Return the underlying type of the value.\n\nExamples:\n\n (type-of 1)\n ; ↳ fixnum\n\n (type-of NIL)\n ; ↳ null\n\n (type-of T)\n ; ↳ bool\n\n (type-of \"hello\")\n ; ↳ str\n\n (type-of (arr 'u32 0 1 2))\n ; ↳ (arr u32)" top-level-value "Return the value bound to the symbol in the top level (global)\nenvironment.\n\nExamples:\n\n (def abc 1)\n (let {[abc 2]}\n (cons abc (top-level-value 'abc)))\n ; ↳ (2 . 1)\n abc\n ; ↳ 1" defstruct "Declare a new structure type with the specified name and slots.\n\nThe default underlying type is a \"named\" vector (`:type vec`), where\nthe first element is the name of the structure's type, the rest are\nthe keyworded slot values. A list with slot values alone can be used\ninstead by adding `:type list` option. The list will not contain the\nname of the struct by default, which can be enabled with `:named T`\noption.\n\nAs an example, the following declaration generates the default\nconstructor for a structure of three slots, with one of them (`c`)\nhaving a non-`NIL` default value and marked as read-only:\n\n (defstruct blah \"Return stuff.\" :doc-group stuff a b (c 1 :read-only T))\n ; (make-blah (:a NIL) (:b NIL) (:c 1))\n ; (blah-a s)\n ; (blah-b s)\n ; (blah-c s)\n ; (blah-a! s new-a)\n ; (blah-b! s new-b)\n\nSlot's options, if any, should be specified after its default value.\nSupported options are:\n\n ; mark the slot as read-only\n ; its value can be read, but trying to modify it will throw an error\n … :read-only T\n\nThe constructor can be changed in several ways:\n\n ; disable the constructor altogether\n (defstruct blah :constructor NIL a b c)\n ; only change its name\n (defstruct blah :constructor blargh a b c)\n ; rename AND avoid using keywords\n (defstruct blah :constructor (blah a b c) a b c)\n\nThe option `:conc-name` specifies the slot accessor/setter prefix,\nwhich defaults to `structname-`. Prefix can be disabled entirely with\n`:conc-name NIL`.\n\nSlot setters are generated for writable slots by appending `!`\n(exclamation mark) to the accessor's name.\n\nDefault predicate can be disabled or its name, which defaults to\n`structname?`, changed:\n\n ; use \"blargh?\" instead of \"blah?\"\n (defstruct blah :predicate blargh? a b c)\n ; without predicate\n (defstruct blah :predicate NIL a b c)" caadar "Shorthand for (car (car (cdr (car lst))))." foldl1 "Same as `foldl` but using the first element of the list as the\ninitial accumulator.\n\nExamples:\n\n (foldl1 * (iota 6 1))\n ; ↳ 720" buffer "Return an in-memory buffer for I/O, of `io` type.\n\nA buffer can be used for both reading and writing at the same\ntime." assoc-list "Construct an association list from the arguments.\n\nEvery two arguments are expected to be a key and a value associated\nwith that key.\n\nExamples:\n\n (assoc-list 'a 0 'b 1)\n ; ↳ ((a . 0) (b . 1))" builtin? "Return `T` if `v` is a built-in function implemented in C, `NIL`\notherwise.\n\nExamples:\n\n (builtin? map)\n ; ↳ T\n\n (builtin? macroexpand)\n ; ↳ NIL" str-map "Return the concatenation of the values produced by `fn` when applying\nto each rune of the string `s`.\n\nFunction `fn` may return a value of any type suitable for `io-write` -\na rune, string, array of C primitives. If `fn` returns `NIL`, the\nrune is ignored.\n\nExamples:\n\n (str-map rune-upcase\n \"hello, world!\")\n ; ↳ \"HELLO, WORLD!\"\n\n (str-map (λ (r) (str r r))\n \"hello\")\n ; ↳ \"hheelllloo\"\n\n (str-map (λ (r) (and (not (rune-whitespace? r)) r))\n \"! this is great !\")\n ; ↳ \"!thisisgreat!\"" macroexpand-1 "Return a macro-expanded expression.\n\nIf the expression is not a macro call, it is returned unchanged.\nOnly a single level of expansion is performed.\n\nExamples:\n\n (let ((a 3) (b 4) (c 5))\n (macroexpand-1 `(let* {[x ,a] [y ,b]} (+ x y ,c))))\n ; ↳ ((λ (x) ; note how the inner let* expression isn't expanded\n (let* ((y 4)) (+ x y 5)))\n 3)" str "Return concatenation of terms formatted as strings.\n\nThis is equivalent to `(princ terms…)`, except the string is\n_returned_, rather than printed.\n\nExamples:\n\n (str \"a\" 'b 1 #(0))\n ; ↳ \"ab1#(0)\"" negative? "Return `T` if `n` is a negative number. Shorthand for `(< n 0)`." void "Return the constant `#<void>` while ignoring any arguments.\n\n`#<void>` is mainly used when a function has side effects but does not\nproduce any meaningful value to return, so even though `T` or `NIL` could\nbe returned instead, in case of `#<void>` alone, REPL will not print\nit." assert-fail "Throw an \"assertion failed\" exception if evaluating `expr` itself does\nnot result in an exception thrown. Return `T` otherwise.\n\nTo test for a specific exception type, an optional `what` argument can\nbe used.\n\nExamples:\n\n (def s \"abc\")\n (assert-fail (= (length s) 3))\n ; ‼ assertion failed: ...\n (assert-fail (= s 1) type-error)\n ; ↳ T" io-read-line "Return a single line of input read from `io`.\n\nReading stops at either a `#\\linefeed` character or upon reaching EOF.\nThe line feed character is included in the returned value unless EOF\nhas been reached beforehand.\n\nEOF (`#<eof-object>`) is returned if the IO object had no data.\n\nExamples:\n\n ; read one line from the kernel messages file\n (io-read-line (file \"/dev/kmesg\"))\n ; ↳ \"127 holes free\\n\"\n\n ; /dev/null has no data - EOF is returned\n (eof-object? (io-read-line (file \"/dev/null\")))\n ; ↳ T" and "Return `NIL` and stop evaluating the arguments if one of them\nevaluated to `NIL`. Return the last value otherwise.\n\nExamples:\n\n (and)\n ; ↳ T\n\n (and 1 2 (print 'yes) 3)\n ; ‼ yes\n ; ↳ 3\n\n (and 1 NIL (print 'yes) 3)\n ; ↳ NIL" 1- "Equivalent to `(- n 1)` - decrement by one." that "The result of the last expression evaluated in the REPL.\n\nExamples:\n\n (map rune-upcase \"hello, world!\")\n ; ↳ \"HELLO, WORLD!\"\n (str-sub that 0 5)\n ; ↳ \"HELLO\"\n (map rune-downcase that)\n ; ↳ \"hello\"" (doc |
| 79 | 79 | group prop) "Dealing with properties of symbols." (doc group vm) "VM-related functions." equal? "Return `T` if both `a` and `b` are of the same value. For non-leaf\ntypes (cons cell and vector), the equality test is performed\nthroughout the whole structure of the values.\n\nExamples:\n\n (equal? 0.0 0)\n ; ↳ NIL\n\n (equal? 0 0)\n ; ↳ T\n\n (def a \"1\")\n (def b \"1\")\n (equal? a b)\n ; ↳ T\n\n (def a '(1))\n (def b '(1))\n (equal? a b)\n ; ↳ T" cddar "Shorthand for (cdr (cdr (car lst)))." *interactive* "Variable indicating whether VM is running in \"interactive\" mode (`T`,\nREPL is active) or not (`NIL`, REPL is not active).\n\nInteractive mode can be forced by adding `-i` as the first command\nline argument." unquote "Evaluate the expression, which is a part of a quasiquoted expression\nitself.\n\nShorthand for `(unquote expr)`.\n\nExamples:\n\n `(0 1 ,(+ 2 3)) ; same as (quasiquote (0 1 (unquote (+ 2 3))))\n ; ↳ (0 1 5)" or "Return the first evaluated argument that is not `NIL` and stop\nevaluating the rest of the arguments. Return `NIL` otherwise.\n\nExamples:\n\n (or)\n ; ↳ NIL\n\n (or 1 2 (print 'first) (print 'second) 3)\n ; ↳ 1\n\n (or NIL NIL (print 'first) (print 'second) 3)\n ; ‼ first" = "Numerical equality test. Return `T` if all numbers are equal,\n`NIL` otherwise." fn? "Return `T` if `v` is a function, `NIL` otherwise.\n\nExamples:\n\n (fn? (void))\n ; ↳ NIL\n\n (fn? map)\n ; ↳ T\n\n (fn? macroexpand)\n ; ↳ T" (doc |
| 80 | 80 | group type) "Dealing with types." caaadr "Shorthand for (car (car (car (cdr lst))))." make-system-image "Build and store a \"system image\" of the runtime environment to a file." subseq "Return a bounded part of a sequence.\n\nThe returned value is always a copy of the subsequence of the\noriginal. It is an error if either `start` or `end` (if specified)\nare out of bounds.\n\nExamples:\n\n (subseq \"hello\" 1 2)\n ; ↳ \"e\"\n\n (subseq '(1 2 3) 0 2)\n ; ↳ (1 2)\n\n (subseq #(a b c) 2)\n ; ↳ #(c)" set! "Evaluate the expression, assign the result to the identifier and\nreturn the value.\n\nThe identifier must already be bound in the same environment,\notherwise this results in a compilation error.\n\nMultiple identifiers and expressions may be specified in pairs. The\nreturned value will be the result of the last expression.\n\nExamples:\n\n (def a NIL)\n (def b NIL)\n (def c NIL)\n (set! a 1 b 2 c (+ a b))\n ; ↳ 3\n a\n ; ↳ 1\n b\n ; ↳ 2\n c\n ; ↳ 3" vm-stats "Print various VM-related information, such as the number of GC\ncalls so far, heap and stack size, etc." ptr "Construct an abstract pointer value. The bit width is either 32-bit\nor 64-bit, depending on the platform the code is executing on.\n\nNote: certain arithmetic operations on pointers, such as division and\nmultiplication, will throw an error. This is done on purpose since\ndoing that on pointers rarely makes sense." caddar "Shorthand for (car (cdr (cdr (car lst))))." print-stack-trace "Print the stacktrace." *stdin* "Standard input IO stream." cosh "Return the hyperbolic cosine of `x`." < "Return `T` if the arguments are in strictly increasing order (next\none is greater than the previous one). With a single argument\nthe result is always `T`." (doc |
| @@ -259,12 +259,12 @@ group number) "Operations on numbers, mathematical constants." cdaddr "Shorthan · 178 unmodified lines |
| 259 | 259 | *syntax-environment* #table(while #fn("z12001PP:" #($while) 7) trycatch #fn("n22001e3:" #($trycatch) 7) def #fn("z2200182PPP:" #($def) 8) prog1 #fn("z12001PP:" #($prog1) 7) bcode:nconst #fn("n1200r2e3:" #(aref) 7) bcode:spmax #fn("n1200r5e3:" #(aref) 7) with-input-from #fn("z12021e1220e2e1e17315163:" #(#fn(nconc) |
| 260 | 260 | with-bindings *io-in* copy-list) 9) defmacro #fn("z17015186<86=873?0710<870=53@30q42223240<e22526e10=e177885153e3Ie3:" #(separate-doc-from-body |
| 261 | 261 | sym-set-doc begin set-syntax! quote #fn(nconc) λ copy-list) 15) unless #fn("z1200q211Pe4:" #(if |
| 262 | | −begin) 9) time #fn("n1202122e1e2e123024252622e121e32728e5e3e3:" #(let #:g557 time-now prog1 |
| 262 | +begin) 9) time #fn("n1202122e1e2e123024252622e121e32728e5e3e3:" #(let #:g560 time-now prog1 |
| 263 | 263 | princ "Elapsed time: " - " seconds" |
| 264 | 264 | *linefeed*) 13) cond #fn("z0Ib5852085>1_485<061:" #(#fn("n10H340q:0<85<20Q;J80485<DQ3C085=J6085<:2185=P:85=J@02285<A<0=51e3:85T23C\x94074758551513c07675855151278685<e2e12886217975855151PA<0=51e4e3:272:85<e2e1282:7585512:e2A<0=51e4e3:2885<2185=PA<0=51e4:" #(else |
| 265 | | −begin or => 1arg-lambda? caddr caadr let if cddr #:g486) cond-clauses->if 14)) 7) do #fn("z21<2071052207205220230522425268827872829e17:1=51522829e17:82512825e18:52e153e4e3e2e12825e18952e3:" #(#fn(map) |
| 266 | | −car cadr #fn("n170051B38071061:0<:" #(cddr caddr) 6) letrec #:g505 λ if #fn(nconc) begin |
| 267 | | −copy-list) 21) assert-fail #fn("z12021220qe32324e113E0252624e2271<e2e3@30De3e3e2:" #(assert |
| 265 | +begin or => 1arg-lambda? caddr caadr let if cddr #:g489) cond-clauses->if 14)) 7) do #fn("z21<207105220720522023052242526882728e187e12729e17:1=5152e17:82512725e18:52e155e3e2e12725e18952e3:" #(#fn(map) |
| 266 | +car cadr #fn("n170051B38071061:0<:" #(cddr caddr) 6) letrec #:g508 λ #fn(nconc) if begin |
| 267 | +copy-list) 20) assert-fail #fn("z12021220qe32324e113E0252624e2271<e2e3@30De3e3e2:" #(assert |
| 268 | 268 | trycatch |
| 269 | 269 | begin λ e |
| 270 | 270 | eq? car |
| @@ -312,8 +312,9 @@ copy-list) 8) defstruct #fn("z0700=5185<85=0<I218887>2?94863H0728873862489Pe152 · 41 unmodified lines |
| 312 | 312 | "\n\n" #fn(str-sub) "" #fn(str-split) print-to-str #fn(list*) defstruct "\n" #fn(str) "\n\n " |
| 313 | 313 | str-join "\n ") fmt 14) sym-set-doc append :doc-fmt #fn(nconc) %defstruct% copy-list) 15) with-output-to #fn("z12021e1220e2e1e17315163:" #(#fn(nconc) |
| 314 | 314 | with-bindings *io-out* copy-list) 9) bcode:ctable #fn("n1200Ke3:" #(aref) 7) catch #fn("n22012122e123242522e2262722e22829e2e3262:22e20e3e42;22e22<22e2e4e3e3:" #(trycatch |
| 315 | | −λ #:g549 if and cons? eq? car quote thrown-value cadr caddr raise) 15) let* #fn("z10H3E02021e1qe17215153e1:2021e173051e1e1720=B3H02024e10=e17215153e1@301515375051e2:" #(#fn(nconc) |
| 316 | | −λ copy-list caar let* cadar) 13) return #fn("|00001000W0000J907050?04210e2:" #(void $return) 6) if #fn("n3200182e4:" #($if) 8) letrec #fn("z1202021e12273052e122240527515154e1227605262:" #(#fn(nconc) |
| 315 | +λ #:g552 if and cons? eq? car quote thrown-value cadr caddr raise) 15) let* #fn("z10H3E02021e1qe17215153e1:2021e173051e1e1720=B3H02024e10=e17215153e1@301515375051e2:" #(#fn(nconc) |
| 316 | +λ copy-list caar let* cadar) 13) return #fn("|00001000W0000J907050?04210e2:" #(void $return) 6) if #fn("z282360q@80702151422012382Pe4:" #(arg-error |
| 317 | +"if without an else branch" $if begin) 9) letrec #fn("z1202021e12273052e122240527515154e1227605262:" #(#fn(nconc) |
| 317 | 318 | λ #fn(map) car #fn("n12021e17205162:" #(#fn(nconc) set! copy-list) 8) copy-list void) 11) bcode:sp #fn("n1200r4e3:" #(aref) 7) defdoc #fn("z10B86;35040<;J404086;35040=70711225251<863I0232487e22489e22488e2e4:232487e22489e2e3:" #(separate-doc-from-body |
| 318 | 319 | append (NIL) sym-set-doc quote) 13) assert #fn("n1200D2122230e2e2e2e4:" #(if raise quote |
| 319 | 320 | assert-failed) 11) case #fn("z1IIb6b78620_4872186>1_4225023880e2e12425e126278788>215252e3:" #(#fn("n1700513400:210e2:" #(self-evaluating? |
| @@ -326,7 +327,7 @@ $set! cddr) 8)) 9) receive #fn("z22021q1e32221e10e173825153e3:" #(call-with-val · 6 unmodified lines |
| 326 | 327 | #fn(length) foldl #fn("n22021AF0~52C7022@40231e1P:" #(#\a #fn(str-rune) car cdr) 9) lst iota def |
| 327 | 328 | "Shorthand for " "." :doc-group list) 13) dotimes #fn("z10<0T20E2187Ke32223e186e1e17415153e4:" #(for |
| 328 | 329 | - #fn(nconc) λ copy-list) 14) unwind-protect #fn("n2202122q1e3e2e1232402225e121e12625e2e4e321e1e3e3:" #(let |
| 329 | | −#:g550 λ prog1 trycatch #:g551 raise) 14) throw #fn("n220212223e201e4e2:" #(raise list quote |
| 330 | +#:g553 λ prog1 trycatch #:g554 raise) 14) throw #fn("n220212223e201e4e2:" #(raise list quote |
| 330 | 331 | thrown-value) 9) doc-group #fn("n22021222324e22325e2230e2e41e3e2:" #(begin |
| 331 | 332 | sym-set-doc list quote doc group) 11)) |
| 332 | 333 | 1+ #fn("n10KM:" #() 1+ 6) 1- |
| @@ -731,7 +732,7 @@ top-level-exception-handler #fn("n17071w042285>1230>12486>1{86504:" #(*io-out* * · 398 unmodified lines |
| 731 | 732 | #fn("n070A51471225061:" #(print-exception |
| 732 | 733 | print-stack-trace #fn(stacktrace)) 6) #fn("n1A50420061:" #(#fn(raise)) 6)) top-level-exception-handler 8) |
| 733 | 734 | trace #fn("n120051718551Jc02207324252627280e225e3e229e12:2885e225e3e55152@30q^14I:" #(#fn(top-level-value) |
| 734 | | −traced? #fn(set-top-level-value!) eval λ #:g552 write cons quote newline apply) trace 15) |
| 735 | +traced? #fn(set-top-level-value!) eval λ #:g555 write cons quote newline apply) trace 15) |
| 735 | 736 | traced? #fn("n12071051;3?0422051228551d:" #(#fn("z020210P51472504230}2:" #(#fn(write) |
| 736 | 737 | x newline #.apply) 7) |
| 737 | 738 | closure? #fn(fn-code)) traced? 8) |