]> git.eli173.com Git - klapaucius/commitdiff
documentation updates/fixes v-12.13.13
authorElijah Cohen <eli@eli173.com>
Sat, 4 Jan 2025 17:00:47 +0000 (11:00 -0600)
committerElijah Cohen <eli@eli173.com>
Sat, 4 Jan 2025 17:00:47 +0000 (11:00 -0600)
doc/builtins.html
doc/index.html

index 41016d40f6106cb262178a9b1f003880a4b8729d..f4c0d3f46b8d76dc619ac8bc44b61d7619b350cc 100644 (file)
@@ -11,6 +11,7 @@
                        <article>
                                <h1>Builtins</h1>
                                <p>The operations built in to the language are described here, roughly organized by topic and significance. Examples ought to be included.</p>
+                               <p>Worth note, this describes not how one ought to use the language, but the operations built into the core of the interpreter. Though many of these operations will be useful in many many conceivable programs, their appearance here is only to document the very core of the language. Everything not detailed here is composed of things here.</p>
                                <nav>
                                        <h2>Contents</h2>
                                        <ul>
@@ -35,6 +36,7 @@
                                                <a class="rel" href="#core_atom">atom</a>
                                                <a class="rel" href="#core_rest">rest</a>
                                                <a class="rel" href="#core_unquote">unquote</a>
+                                               <a class="rel" href="#core_evalarg">evalarg</a>
                                                <a class="rel" href="#core_type">type</a>
                                                <a class="rel" href="#core_def">def</a>
                                                <a class="rel" href="#core_exit">exit</a>
  → 5
 ← (unquote (quote (+ 4 5)))
  → 9</pre>
+                                       </div>
+                                       <div id="core_evalarg">
+                                               <h4>evalarg</h4>
+                                               <p><code>evalarg</code> is a tricky but incredibly useful builtin, and in a sense functions much like a combinator. Given two arguments, it evaluates the second, and puts them back in order, so that the first argument will be called on the evaluated version of the second. Most useful for controlling the order of execution.</p>
+                                               <pre>
+← (x-times-n (rand 10) 5)
+ → (0 8 3 9 7)
+← (evalarg x-times-n (rand 10) 5)
+ → (2 2 2 2 2)</pre>
                                        </div>
                                        <div id="core_type">
                                                <h4>type</h4>
@@ -189,6 +200,8 @@ note: the prior line just shows how builtins might be represented in the languag
                                                <a class="rel" href="#arith_mul">mul</a>
                                                <a class="rel" href="#arith_div">div</a>
                                                <a class="rel" href="#arith_mod">mod</a>
+                                               <a class="rel" href="#arith_gt">gt</a>
+                                               <a class="rel" href="#arith_lt">lt</a>
                                        </div>
                                        <div id="arith_add">
                                                <h4>+ (add)</h4>
@@ -229,6 +242,28 @@ note: the prior line just shows how builtins might be represented in the languag
 ← (% 30 7)
  → 2</pre>
                                        </div>
+                                       <div id="arith_gt">
+                                               <h4>&gt; (greater than)</h4>
+                                               <p>Applies to two uints, returns <code>t</code> or <code>nil</code> depending on whether the first argument is greater than the second.</p>
+                                               <pre>
+← (&gt; 10 3)
+ → t
+← (&gt; 3 7)
+ → nil
+← (&gt; 4 4)
+ → nil</pre>
+                                       </div>
+                                       <div id="arith_lt">
+                                               <h4>&lt; (less than)</h4>
+                                               <p>Applies to two uints, returns <code>t</code> or <code>nil</code> depending on whether the first argument is less than the second.</p>
+                                               <pre>
+← (&lt; 10 3)
+ → nil
+← (&lt; 3 7)
+ → t
+← (&lt; 4 4)
+ → nil</pre>
+                                       </div>
                                </div>
                                <div id="combinators">
                                        <h3>combinators</h3>
index a73840afe09939cd6cf63253c31a9535feed1e27..c026fa64d44b62f24d6f6c9ebb006ca1d0b01334 100644 (file)
@@ -3,13 +3,13 @@
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <html>
   <head>
-    <title>klaupacius</title>
+    <title>klapaucius</title>
                <link href="style.css" rel="stylesheet" type="text/css" />
   </head>
   <body>
     <div>
                        <article>
-                               <h2>klaupacius</h2>
+                               <h2>klapaucius</h2>
                                <p>A language so inspired by lisps, forths and array languages that it resembles none of these.</p>
                                <p>A combinator-based, concatenative, tacit lisp with automatic memory management, immutability, partial application, some church encodings, without variables or lambdas, where everything is a function.</p>
                                <p><a href="repl">repl</a> <a href="https://git.eli173.com/?p=klapaucius">src</a></p>