From da617713c312724c097c827be354710914e8764c Mon Sep 17 00:00:00 2001 From: teo3300 Date: Sat, 10 May 2025 13:05:02 +0900 Subject: [PATCH] Fixe documentation --- Makefile | 4 ++++ src/core.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e3e1461..5ab7790 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,10 @@ conf: test @test -s ${CONFIG_FILE} || (\ echo ";; Write here your mal config" >> ${MAL_HOME}/config.mal\ && echo "; (def! BANNER \"\") ; Hide banner at startup" >> ${MAL_HOME}/config.mal\ + && echo '' >> ${MAL_HOME}/config.mal\ + && echo '(def! BANNER (str BANNER' >> ${MAL_HOME}/config.mal\ + && echo '";\n; **** To remove this banner and config mal, edit: ****\n"' >> ${MAL_HOME}/config.mal\ + && echo '"; /Users/rogora/.config/mal/config.mal\n"))' >> ${MAL_HOME}/config.mal\ ) install: build-release test conf diff --git a/src/core.rs b/src/core.rs index 7d300b4..bf59e8d 100644 --- a/src/core.rs +++ b/src/core.rs @@ -67,7 +67,7 @@ pub fn ns_init() -> Env { "<=" => Fun(|a| comparison_op( |a, b| a <= b, a), "Returns true if the first argument is smaller than or equal to the second one, nil otherwise"), ">=" => Fun(|a| comparison_op( |a, b| a >= b, a), "Returns true if the first argument is greater than or equal to the second one, nil otherwise"), "pr-str" => Fun(|a| Ok(Str(a.iter().map(|i| pr_str(i, true)).collect::>().join("").into())), "Print readably all arguments"), - "str" => Fun(|a| Ok(Str(a.iter().map(|i| pr_str(i, false)).collect::>().join("").into())), "Print non readably all arguments"), + "str" => Fun(|a| Ok(Str(a.iter().map(|i| pr_str(i, false)).collect::>().join("").into())), "Concatenate all arguments as a string"), "prn" => Fun(|a| {a.iter().for_each(|a| print!("{}", pr_str(a, false))); let _ = io::stdout().flush(); Ok(Nil) }, "Print readably all the arguments"), "println" => Fun(|a| {a.iter().for_each(|a| print!("{}", pr_str(a, false))); println!(); Ok(Nil) }, "Print readably all the arguments"), "list" => Fun(|a| Ok(List(a.into())), "Return the arguments as a list"),