From 79ee784a5b7cda22b3be6f2d810d1f81f833b312 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Sun, 8 Sep 2024 12:51:17 +0200 Subject: [PATCH] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 494b8ae..98ff53c 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ func main { mega | with args ; { str | " " concat } swap:map &print swap:foreach "" println - println <{ "and with that, we're done" } + println<"and with that, we're done"> 0 } ``` @@ -177,19 +177,19 @@ func main { mega | with args ; ``` - SPL actually isn't fully concatenative. It supports postfix arguments as well: ```js - println <{ "and with that, we're done" } + println<"and with that, we're done"> ``` This is actually not a special interpreter feature, more so is it a special lexer feature. This is 100% equivalent with the non-postfix version, where the string is right before the `println`. The same can be done for object calls. Let's rewrite the previous code with - postfix: + prefix notation: ```js - Range:new <{ 0 5 } + Range:new<0 5> :iter - :map <{ { | 5 * } } - :foreach <{ { | _str println } } + :map<{ | 5 * }> + :foreach<{ | _str println }> ``` I lied. This is now no longer 100% equivalent. Let's look at what happens @@ -261,4 +261,4 @@ As you can see, it's relatively straight-forward to do; but there are some major The second one is easy to fix, but I intend to fix the first one first. Sadly, fixing it requires compiling the code as a dynamic library and also getting it to work with the program its running in. -If anyone knows how to do this properly, I'd REALLY appreciate a PR or issue explaining it. \ No newline at end of file +If anyone knows how to do this properly, I'd REALLY appreciate a PR or issue explaining it.