From df6b5b5f06e3bbbffaa2567fe2c0b340145d9d02 Mon Sep 17 00:00:00 2001 From: Ava Hahn Date: Mon, 20 Mar 2023 23:11:29 -0700 Subject: [PATCH] reformat some readme stuff --- Readme.org | 21 ++++++++++----------- src/bin/main.rs | 2 +- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Readme.org b/Readme.org index 8d4cd0c..3a9b890 100644 --- a/Readme.org +++ b/Readme.org @@ -96,9 +96,9 @@ Like the *if form*, if the conditional returns a non-boolean value the *while lo #+BEGIN_SRC lisp (while (get-my-flag global-state) ;; if false, returns (nothing) immediately - (dothing) ;; this is evaluated - "simple token" ;; this is also evaluated - (toggle-my-flag global-state)) ;; this is also evaluated + (dothing) ;; this is evaluated + "simple token" ;; this is also evaluated + (toggle-my-flag global-state)) ;; this is also evaluated #+END_SRC **** Let @@ -172,9 +172,9 @@ The *quote* function allows data (code) to be passed around without evaluating i To be specific, typing ~(a)~ usually results in a symbol lookup for ~a~, and then possibly even a function call. However, if we *quote* ~a~, we can pass around the symbol itself: #+BEGIN_SRC lisp - (quote a) ;; returns the symbol a + (quote a) ;; returns the symbol a (quote (add 1 2)) ;; returns the following tree: (add 1 2) - (q a) ;; returns the symbol a + (q a) ;; returns the symbol a #+END_SRC (note that ~quote~ may be shortened to ~q~) @@ -243,7 +243,7 @@ In this case, the value derived from the final form in the function will be retu (def my-iter 'an iterator to use in my while loop' 0) ;; a variable (def plus-one 'adds 1 to a number' (x) (add 1 x)) ;; a function (def multi-func 'example of multi form function' - (x y) ;; args + (x y) ;; args (inc my-iter) ;; an intermediate calculation (add x y my-iter)) ;; the final form of the function. X+Y+MYITER is returned #+END_SRC @@ -333,10 +333,10 @@ The author encourages any users to contribute their own personal favorites not a (def myiter 'iterator over a list' (head (1 2 3 4 5 6))) ;; iterate over each element in mylist - (while (gt? (len (cdr myiter)) 0) ;; while there are more elements to consume - (let ((elem (car myiter)) ;; elem = consumed element from myiter - (remaining (cdr myiter))) ;; remaining = rest of elements - (echo elem) ;; do a thing with the element, could be any operation + (while (gt? (len (cdr myiter)) 0) ;; while there are more elements to consume + (let ((elem (car myiter)) ;; elem = consumed element from myiter + (remaining (cdr myiter))) ;; remaining = rest of elements + (echo elem) ;; do a thing with the element, could be any operation (def myiter (head remaining)))) ;; consume next element, loop #+END_SRC @@ -494,7 +494,6 @@ Note: this section only tracks the state of incomplete TODO items. Having everyt - Readme documentation for POSIX module - logging library - make const all the error messages -- Should globals be immutable? ** TODO alpha tasks - Rename to Flesh diff --git a/src/bin/main.rs b/src/bin/main.rs index c88e986..bd56f8e 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -38,7 +38,7 @@ impl Prompt for CustomPrompt<'_> { fn render_prompt_right(&self) -> Cow { { - Cow::Owned(format!(" <")) + Cow::Owned(format!("")) } }