144 lines
29 KiB
HTML
144 lines
29 KiB
HTML
<!DOCTYPE html PUBLIC ""
|
||
"">
|
||
<html><head><meta charset="UTF-8" /><title>Additional Instructions</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Propeller</span> <span class="project-version">0.3.2</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="A_Guide_To_Propeller.html"><div class="inner"><span>A Guide to Propeller</span></div></a></li><li class="depth-1 "><a href="Adding_Genetic_Operators.html"><div class="inner"><span>Adding Genetic Operators</span></div></a></li><li class="depth-1 "><a href="Adding_Problem.html"><div class="inner"><span>Adding a Problem</span></div></a></li><li class="depth-1 "><a href="Adding_Selection_Method.html"><div class="inner"><span>Adding a Selection Method</span></div></a></li><li class="depth-1 current"><a href="Additional_Instructions.html"><div class="inner"><span>Additional Instructions</span></div></a></li><li class="depth-1 "><a href="Downsampling_training_data.html"><div class="inner"><span># Downsample Functions</span></div></a></li><li class="depth-1 "><a href="Generating_Documentation.html"><div class="inner"><span>Generating Documentation for Propeller</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>propeller</span></div></div></li><li class="depth-2 branch"><a href="propeller.downsample.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>downsample</span></div></a></li><li class="depth-2 branch"><a href="propeller.genome.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>genome</span></div></a></li><li class="depth-2 branch"><a href="propeller.gp.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gp</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>problems</span></div></div></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>PSB1</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.PSB1.count-odds.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>count-odds</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB1.grade.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>grade</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB1.scrabble-score.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrabble-score</span></div></a></li><li class="depth-4"><a href="propeller.problems.PSB1.small-or-large.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>small-or-large</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>PSB2</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.basement.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>basement</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.bouncing-balls.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bouncing-balls</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.bowling.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bowling</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.camel-case.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>camel-case</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.dice-game.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dice-game</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.find-pair.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>find-pair</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.fizz-buzz.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fizz-buzz</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.fuel-cost.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fuel-cost</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.gcd.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcd</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.luhn.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>luhn</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.middle-character.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middle-character</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.paired-digits.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>paired-digits</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.shopping-list.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>shopping-list</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.snow-day.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>snow-day</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.solve-boolean.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>solve-boolean</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.spin-words.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>spin-words</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.square-digits.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>square-digits</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.substitution-cipher.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>substitution-cipher</span></div></a></li><li class="depth-4"><a href="propeller.problems.PSB2.twitter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twitter</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.UBall5D.html"><div class="inner"><span class="tree" style="top: -610px;"><span class="top" style="height: 619px;"></span><span class="bottom"></span></span><span>UBall5D</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>boolean</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.boolean.mul3.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mul3</span></div></a></li><li class="depth-4"><a href="propeller.problems.boolean.mul4.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mul4</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.complex-regression.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>complex-regression</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.data-creation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data-creation</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.float-regression.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>float-regression</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.integer-regression.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>integer-regression</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.simple-classification.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simple-classification</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>software</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.software.number-io.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>number-io</span></div></a></li><li class="depth-4"><a href="propeller.problems.software.smallest.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>smallest</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.string-classification.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>string-classification</span></div></a></li><li class="depth-3"><a href="propeller.problems.valiant.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>valiant</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -1230px;"><span class="top" style="height: 1239px;"></span><span class="bottom"></span></span><span>push</span></div></div></li><li class="depth-3"><a href="propeller.push.instructions.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>instructions</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.bool.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bool</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.character.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>character</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.code.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>code</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.input-output.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>input-output</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.numeric.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>numeric</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.parentheses.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parentheses</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.polymorphic.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>polymorphic</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.string.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>string</span></div></a></li><li class="depth-4"><a href="propeller.push.instructions.vector.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vector</span></div></a></li><li class="depth-3 branch"><a href="propeller.push.interpreter.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>interpreter</span></div></a></li><li class="depth-3 branch"><a href="propeller.push.limits.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>limits</span></div></a></li><li class="depth-3"><a href="propeller.push.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-2 branch"><a href="propeller.selection.html"><div class="inner"><span class="tree" style="top: -424px;"><span class="top" style="height: 433px;"></span><span class="bottom"></span></span><span>selection</span></div></a></li><li class="depth-2 branch"><a href="propeller.simplification.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simplification</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tools</span></div></div></li><li class="depth-3 branch"><a href="propeller.tools.calculus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>calculus</span></div></a></li><li class="depth-3 branch"><a href="propeller.tools.character.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>character</span></div></a></li><li class="depth-3 branch"><a href="propeller.tools.distributions.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distributions</span></div></a></li><li class="depth-3 branch"><a href="propeller.tools.math.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>math</span></div></a></li><li class="depth-3"><a href="propeller.tools.metrics.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>metrics</span></div></a></li><li class="depth-2 branch"><a href="propeller.utils.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="propeller.variation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>variation</span></div></a></li></ul></div><div class="document" id="content"><div class="doc"><div class="markdown"><h1><a href="#table-of-contents" id="table-of-contents"></a>Table of contents</h1>
|
||
<ul>
|
||
<li><a href="#additional-instructions">Additional Instructions</a></li>
|
||
<li><a href="#input_outputcljc">input_output.cljc</a></li>
|
||
<li><a href="#ds_store">.DS_Store</a></li>
|
||
<li><a href="#numericcljc">numeric.cljc</a></li>
|
||
<li><a href="#stringcljc">string.cljc</a></li>
|
||
<li><a href="#charactercljc">character.cljc</a></li>
|
||
<li><a href="#boolcljc">bool.cljc</a></li>
|
||
<li><a href="#codecljc">code.cljc</a></li>
|
||
</ul>
|
||
<h1><a href="#additional-instructions" id="additional-instructions"></a>Additional Instructions</h1>
|
||
<h1><a href="#input-outputcljc" id="input-outputcljc"></a>input_output.cljc</h1>
|
||
<h2><a href="#print-newline" id="print-newline"></a>:print_newline</h2>
|
||
<p>Prints new line</p>
|
||
<h1><a href="#ds-store" id="ds-store"></a>.DS_Store</h1>
|
||
<h1><a href="#numericcljc" id="numericcljc"></a>numeric.cljc</h1>
|
||
<h2><a href="#float-cos" id="float-cos"></a>:float_cos</h2>
|
||
<p>Pushes the cosine of the top FLOAT</p>
|
||
<h2><a href="#float-sin" id="float-sin"></a>:float_sin</h2>
|
||
<p>Pushes the sine of the top FLOAT</p>
|
||
<h2><a href="#float-tan" id="float-tan"></a>:float_tan</h2>
|
||
<p>Pushes the tangent of the top FLOAT</p>
|
||
<h2><a href="#float-from-integer" id="float-from-integer"></a>:float_from_integer</h2>
|
||
<p>Pushes the floating point version of the top INTEGER</p>
|
||
<h2><a href="#integer-from-float" id="integer-from-float"></a>:integer_from_float</h2>
|
||
<p>Pushes the result of truncating the top FLOAT towards negative infinity</p>
|
||
<h1><a href="#stringcljc" id="stringcljc"></a>string.cljc</h1>
|
||
<h2><a href="#string-butlast" id="string-butlast"></a>:string_butlast</h2>
|
||
<p>Pushes the butlast of the top STRING (i.e. the string without its last letter)</p>
|
||
<h2><a href="#string-concat" id="string-concat"></a>:string_concat</h2>
|
||
<p>Pushes the concatenation of the top two STRINGs (second + first)</p>
|
||
<h2><a href="#string-conj-char" id="string-conj-char"></a>:string_conj_char</h2>
|
||
<p>Pushes the concatenation of the top STRING and the top CHAR (STRING + CHAR)</p>
|
||
<h2><a href="#string-contains" id="string-contains"></a>:string_contains</h2>
|
||
<p>Pushes TRUE if the top STRING is a substring of the second STRING, and FALSE otherwise</p>
|
||
<h2><a href="#string-contains-char" id="string-contains-char"></a>:string_contains_char</h2>
|
||
<p>Pushes TRUE if the top CHAR is contained in the top STRING, and FALSE otherwise</p>
|
||
<h2><a href="#string-drop" id="string-drop"></a>:string_drop</h2>
|
||
<p>Pushes the top STRING with n characters dropped, where n is taken from the top of the INTEGER stack</p>
|
||
<h2><a href="#string-empty-string" id="string-empty-string"></a>:string_empty_string</h2>
|
||
<p>Pushes TRUE if the top STRING is the empty string</p>
|
||
<h2><a href="#string-first" id="string-first"></a>:string_first</h2>
|
||
<p>Pushes the first CHAR of the top STRING</p>
|
||
<h2><a href="#string-from-boolean" id="string-from-boolean"></a>:string_from_boolean</h2>
|
||
<p>Pushes the STRING version of the top BOOLEAN, e.g. “true”</p>
|
||
<h2><a href="#string-from-char" id="string-from-char"></a>:string_from_char</h2>
|
||
<p>Pushes the STRING version of the top CHAR, e.g. “a”</p>
|
||
<h2><a href="#string-from-float" id="string-from-float"></a>:string_from_float</h2>
|
||
<p>Pushes the STRING version of the top FLOAT e.g. “2.05”</p>
|
||
<h2><a href="#string-from-integer" id="string-from-integer"></a>:string_from_integer</h2>
|
||
<p>Pushes the STRING version of the top INTEGER, e.g. “3”</p>
|
||
<h2><a href="#string-indexof-char" id="string-indexof-char"></a>:string_indexof_char</h2>
|
||
<p>Pushes the index of the top CHAR in the top STRING onto the INTEGER stack. If the top CHAR is not present in the top string, acts as a NOOP</p>
|
||
<h2><a href="#string-iterate" id="string-iterate"></a>:string_iterate</h2>
|
||
<p>Iterates over the top STRING using code on the EXEC stack</p>
|
||
<h2><a href="#string-last" id="string-last"></a>:string_last</h2>
|
||
<p>Pushes the last CHAR of the top STRING. If the string is empty, do nothing</p>
|
||
<h2><a href="#string-length" id="string-length"></a>:string_length</h2>
|
||
<p>Pushes the length of the top STRING onto the INTEGER stack</p>
|
||
<h2><a href="#string-nth" id="string-nth"></a>:string_nth</h2>
|
||
<p>Pushes the nth CHAR of the top STRING, where n is taken from the top of the INTEGER stack. If n exceeds the length of the string, it is reduced modulo the length of the string</p>
|
||
<h2><a href="#string-occurencesof-char" id="string-occurencesof-char"></a>:string_occurencesof_char</h2>
|
||
<p>Pushes the number of times the top CHAR occurs in the top STRING onto the INTEGER stack</p>
|
||
<h2><a href="#string-parse-to-chars" id="string-parse-to-chars"></a>:string_parse_to_chars</h2>
|
||
<p>Splits the top string into substrings of length 1 (i.e. into its component characters) and pushes them back onto the STRING stack in the same order</p>
|
||
<h2><a href="#string-remove-char" id="string-remove-char"></a>:string_remove_char</h2>
|
||
<p>Pushes the top STRING, with all occurrences of the top CHAR removed</p>
|
||
<h2><a href="#string-replace" id="string-replace"></a>:string_replace</h2>
|
||
<p>Pushes the third topmost STRING on stack, with all occurences of the second topmost STRING replaced by the top STRING</p>
|
||
<h2><a href="#string-replace-char" id="string-replace-char"></a>:string_replace_char</h2>
|
||
<p>Pushes the top STRING, with all occurences of the second topmost CHAR replaced with the top CHAR</p>
|
||
<h2><a href="#string-replace-first" id="string-replace-first"></a>:string_replace_first</h2>
|
||
<p>Pushes the third topmost STRING on stack, with the first occurence of the second topmost STRING replaced by the top STRING</p>
|
||
<h2><a href="#string-replace-first-char" id="string-replace-first-char"></a>:string_replace_first_char</h2>
|
||
<p>Pushes the top STRING, with the first occurence of the second topmost CHAR replaced with the top CHAR</p>
|
||
<h2><a href="#string-rest" id="string-rest"></a>:string_rest</h2>
|
||
<p>Pushes the rest of the top STRING (i.e. the string without its first letter)</p>
|
||
<h2><a href="#string-reverse" id="string-reverse"></a>:string_reverse</h2>
|
||
<p>Pushes the reverse of the top STRING</p>
|
||
<h2><a href="#string-set-char" id="string-set-char"></a>:string_set_char</h2>
|
||
<p>Pushes the top STRING, with the letter at index n (where n is taken from the INTEGER stack) replaced with the top CHAR. If n is out of bounds, it is reduced modulo the length of the string</p>
|
||
<h2><a href="#string-split" id="string-split"></a>:string_split</h2>
|
||
<p>Splits the top STRING on whitespace, and pushes back the resulting components in the same order</p>
|
||
<h2><a href="#string-substr" id="string-substr"></a>:string_substr</h2>
|
||
<p>Pushes the substring of the top STRING, with beginning and end indices determined by the second topmost and topmost INTEGERs respectively. If an index is out of bounds, the beginning/end of the string is used instead</p>
|
||
<h2><a href="#string-take" id="string-take"></a>:string_take</h2>
|
||
<p>Pushes the substring of the top STRING consisting of its first n letters, where n is determined by the top INTEGER</p>
|
||
<h1><a href="#charactercljc" id="charactercljc"></a>character.cljc</h1>
|
||
<h2><a href="#char-is-letter" id="char-is-letter"></a>:char_is_letter</h2>
|
||
<p>Pushes TRUE onto the BOOLEAN stack if the popped character is a letter</p>
|
||
<h2><a href="#char-is-digit" id="char-is-digit"></a>:char_is_digit</h2>
|
||
<p>Pushes TRUE onto the BOOLEAN stack if the popped character is a digit</p>
|
||
<h2><a href="#char-is-whitespace" id="char-is-whitespace"></a>:char_is_whitespace</h2>
|
||
<p>Pushes TRUE onto the BOOLEAN stack if the popped character is whitespace (newline, space, or tab)</p>
|
||
<h2><a href="#char-from-float" id="char-from-float"></a>:char_from_float</h2>
|
||
<p>Pops the FLOAT stack, converts the top item to a whole number, and pushes its corresponding ASCII value onto the CHAR stack. Whole numbers larger than 128 will be reduced modulo 128. For instance, 248.45 will result in x being pushed.</p>
|
||
<h2><a href="#char-from-integer" id="char-from-integer"></a>:char_from_integer</h2>
|
||
<p>Pops the INTEGER stack and pushes the top element’s corresponding ASCII value onto the CHAR stack. Integers larger than 128 will be reduced modulo 128. For instance, 248 will result in x being pushed</p>
|
||
<h2><a href="#char-all-from-string" id="char-all-from-string"></a>:char_all_from_string</h2>
|
||
<p>Pops the STRING stack and pushes the top element’s constituent characters onto the CHAR stack, in order. For instance, “hello” will result in the top of the CHAR stack being \h \e \l \l \o</p>
|
||
<h1><a href="#boolcljc" id="boolcljc"></a>bool.cljc</h1>
|
||
<h2><a href="#boolean-and" id="boolean-and"></a>:boolean_and</h2>
|
||
<p>Pushes the logical AND of the top two BOOLEANs</p>
|
||
<h2><a href="#boolean-or" id="boolean-or"></a>:boolean_or</h2>
|
||
<p>Pushes the logical OR of the top two BOOLEANs</p>
|
||
<h2><a href="#boolean-not" id="boolean-not"></a>:boolean_not</h2>
|
||
<p>Pushes the logical NOT of the top BOOLEAN</p>
|
||
<h2><a href="#boolean-xor" id="boolean-xor"></a>:boolean_xor</h2>
|
||
<p>Pushes the logical XOR of the top two BOOLEAN</p>
|
||
<h2><a href="#boolean-invert-first-then-and" id="boolean-invert-first-then-and"></a>:boolean_invert_first_then_and</h2>
|
||
<p>Pushes the logical AND of the top two BOOLEANs, after applying NOT to the first one</p>
|
||
<h2><a href="#boolean-invert-second-then-and" id="boolean-invert-second-then-and"></a>:boolean_invert_second_then_and</h2>
|
||
<p>Pushes the logical AND of the top two BOOLEANs, after applying NOT to the second one</p>
|
||
<h2><a href="#boolean-from-float" id="boolean-from-float"></a>:boolean_from_float</h2>
|
||
<p>Pushes FALSE if the top FLOAT is 0.0, and TRUE otherwise</p>
|
||
<h2><a href="#boolean-from-integer" id="boolean-from-integer"></a>:boolean_from_integer</h2>
|
||
<p>Pushes FALSE if the top INTEGER is 0, and TRUE otherwise</p>
|
||
<h1><a href="#codecljc" id="codecljc"></a>code.cljc</h1>
|
||
<h2><a href="#code-append" id="code-append"></a>:code_append</h2>
|
||
<p>Concatenates the top two instructions on the :code stack and pushes the result back onto the stack</p>
|
||
<h2><a href="#exec-do-range" id="exec-do-range"></a>:exec_do_range</h2>
|
||
<p>Executes the top EXEC instruction (i.e. loops) a number of times determined by the top two INTEGERs, while also pushing the loop counter onto the INTEGER stack. The top INTEGER is the “destination index” and the second INTEGER is the “current index”. If the integers are equal, then the current index is pushed onto the INTEGER stack and the code (which is the “body” of the loop) is pushed onto the EXEC stack for subsequent execution. If the integers are not equal, then the current index will still be pushed onto the INTEGER stack but two items will be pushed onto the EXEC stack - first a recursive call to :exec_do_range (with the same code and destination index, but with a current index that has been either incremented or decremented by 1 to be closer to the destination index) and then the body code. Note that the range is inclusive of both endpoints a call with integer arguments 3 and 5 will cause its body to be executed 3 times, with the loop counter having the values 3, 4, and 5. Note also that one can specify a loop that “counts down” by providing a destination index that is less than the specified current index.</p>
|
||
<h2><a href="#exec-do-count" id="exec-do-count"></a>:exec_do_count</h2>
|
||
<p>Executes the top EXEC instruction (i.e. loops) a number of times determined by the top INTEGER, pushing an index (which runs from 0 to one less than the total number of iterations) onto the INTEGER stack prior to each execution of the loop body. If the top INTEGER argument is <= 0, this becomes a NOOP</p>
|
||
<h2><a href="#exec-do-times" id="exec-do-times"></a>:exec_do_times</h2>
|
||
<p>Like :exec_do_count, but does not push the loop counter onto the INTEGER stack</p>
|
||
<h2><a href="#exec-if" id="exec-if"></a>:exec_if</h2>
|
||
<p>If the top BOOLEAN is TRUE, removes the the second item on the EXEC stack, leaving the first item to be executed. Otherwise, removes the first item, leaving the second to be executed. Acts as a NOOP unless there are at least two items on the EXEC stack and one item on the BOOLEAN stack</p>
|
||
<h2><a href="#exec-when" id="exec-when"></a>:exec_when</h2>
|
||
<p>If the top BOOLEAN is TRUE, leaves the first item on the EXEC stack to be executed. Otherwise, it removes it. Acts as a NOOP unless there is at least one item on the EXEC stack and one item on the BOOLEAN stack</p>
|
||
<h2><a href="#exec-while" id="exec-while"></a>:exec_while</h2>
|
||
<p>Keeps executing the top instruction on the EXEC stack while the top item on the BOOLEAN stack is true</p>
|
||
<h2><a href="#exec-do-while" id="exec-do-while"></a>:exec_do_while</h2>
|
||
<p>Keeps executing the top instruction on the EXEC stack while the top item on the BOOLEAN stack is true. Differs from :exec_while in that it executes the top instruction at least once</p>
|
||
<h2><a href="#exec-k" id="exec-k"></a>:exec_k</h2>
|
||
<p>The “K combinator” - removes the second item on the EXEC stack</p>
|
||
<h2><a href="#exec-s" id="exec-s"></a>:exec_s</h2>
|
||
<p>The “S combinator” - pops 3 items from the EXEC stack, which we will call A, B, and C (with A being the first one popped), and then pushes a list containing B and C back onto the EXEC stack, followed by another instance of C, followed by another instance of A</p>
|
||
<h2><a href="#exec-y" id="exec-y"></a>:exec_y</h2>
|
||
<p>The “Y combinator” - inserts beneath the top item of the EXEC stack a new item of the form “(:exec_y TOP_ITEM)”</p>
|
||
</div></div></div></body></html> |