<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>
<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>
<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>
← (% 30 7)
→ 2</pre>
</div>
+ <div id="arith_gt">
+ <h4>> (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>
+← (> 10 3)
+ → t
+← (> 3 7)
+ → nil
+← (> 4 4)
+ → nil</pre>
+ </div>
+ <div id="arith_lt">
+ <h4>< (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>
+← (< 10 3)
+ → nil
+← (< 3 7)
+ → t
+← (< 4 4)
+ → nil</pre>
+ </div>
</div>
<div id="combinators">
<h3>combinators</h3>
<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>