add docs for circuit
This commit is contained in:
parent
8efa1dbaad
commit
5bdf409a1f
1 changed files with 19 additions and 6 deletions
25
Readme.org
25
Readme.org
|
|
@ -122,7 +122,21 @@ Here you can see the usefulness of being able to declare multiple variables in q
|
||||||
Each variable is in scope for the duration of the let statement and then dropped when the statement has concluded.
|
Each variable is in scope for the duration of the let statement and then dropped when the statement has concluded.
|
||||||
Thus, it is little cost to break complex calculations down into reusable parts.
|
Thus, it is little cost to break complex calculations down into reusable parts.
|
||||||
|
|
||||||
**** TODO Circuit
|
**** Circuit
|
||||||
|
*Circuit* is useful to run a sequence of commands in order.
|
||||||
|
A call to *circuit* comprises of one or more forms in a sequence.
|
||||||
|
All forms in the call to *circuit* are expected to evaluate to a boolean.
|
||||||
|
The first form to evaluate to ~false~ halts the sequence, and false is returned.
|
||||||
|
If all forms evaluate to ~true~, ~true~ is returned.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
#+BEGIN_SRC lisp
|
||||||
|
(circuit
|
||||||
|
(eq? (exit-code my-shell-command) 0)
|
||||||
|
(get-state-flag global-state)
|
||||||
|
(eq? (some-big-calculation) result))
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
**** Not quite control flow
|
**** Not quite control flow
|
||||||
Several other functions use lazy evaluation of their arguments. The below list is non-exhaustive:
|
Several other functions use lazy evaluation of their arguments. The below list is non-exhaustive:
|
||||||
- toggle
|
- toggle
|
||||||
|
|
@ -350,10 +364,6 @@ Note: this section will not show the status of each item unless you are viewing
|
||||||
Note: this section only tracks the state of incomplete TODO items. Having everything on here would be cluttered.
|
Note: this section only tracks the state of incomplete TODO items. Having everything on here would be cluttered.
|
||||||
|
|
||||||
*** TODO list contains via circuit
|
*** TODO list contains via circuit
|
||||||
*** TODO Map function
|
|
||||||
- DOCUMENTATION + TEST:
|
|
||||||
apply a lambda to a list
|
|
||||||
*** TODO Reduce function
|
|
||||||
*** TODO Input function
|
*** TODO Input function
|
||||||
*** TODO Lex function
|
*** TODO Lex function
|
||||||
*** TODO Read function (Input + Lex)
|
*** TODO Read function (Input + Lex)
|
||||||
|
|
@ -383,10 +393,13 @@ Overload Load function to call a binary too
|
||||||
*** TODO Post to relevant channels
|
*** TODO Post to relevant channels
|
||||||
*** TODO Custom ast pretty print
|
*** TODO Custom ast pretty print
|
||||||
*** TODO Implement Compose for lambdas
|
*** TODO Implement Compose for lambdas
|
||||||
|
*** TODO Map function
|
||||||
|
- DOCUMENTATION + TEST:
|
||||||
|
apply a lambda to a list
|
||||||
|
*** TODO Reduce function
|
||||||
*** TODO file operations
|
*** TODO file operations
|
||||||
**** TODO read-to-string
|
**** TODO read-to-string
|
||||||
**** TODO write-to-file
|
**** TODO write-to-file
|
||||||
*** TODO Pick through core/ast and make sure no unnessesary moves are happening
|
|
||||||
*** TODO Network library
|
*** TODO Network library
|
||||||
**** TODO HTTP Client
|
**** TODO HTTP Client
|
||||||
**** TODO TCP Stream client
|
**** TODO TCP Stream client
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue