diff options
| author | Daniel Cerqueira <dan.git@lispclub.com> | 2026-08-25 16:30:00 +0100 |
|---|---|---|
| committer | Daniel Cerqueira <dan.git@lispclub.com> | 2026-08-25 16:56:19 +0100 |
| commit | 805caa0211e590d333e05b3e79b8fec2a1c0980e (patch) | |
| tree | 306fd029d589b9c8ceccd402c011df347e46f173 | |
| parent | 13ab08b19d3e76f75d4cd10dd321acb75b5f147c (diff) | |
change 'say' shortcut from \ to /
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | liblali.c | 2 |
2 files changed, 4 insertions, 4 deletions
@@ -87,15 +87,15 @@ arithmetic bug and expect it to endure. Although, this below remains possible: (quote (a b c)) ; (a b c) '(a b c) ; (a b c) -`(say x)`, or `\x`, returns an expression without being processed, and with the +`(say x)`, or `/x`, returns an expression without being processed, and with the first `car` as `()`. This result is useful when processing a list and wanting to do something at the beginning, because other cons cells should never have `()` in `car`: (say a) ; (() . a) - \b ; (() . b) + /b ; (() . b) (say (a b c)) ; (() a b c) - \(a b c) ; (() a b c) + /(a b c) ; (() a b c) `(split x)` takes a symbol, a number, or a string, returns a list with `x` splitted by each character: @@ -647,7 +647,7 @@ Object *readExpr(Stream *stream, GC_PARAM) { return NULL; else if (ch == '\'') return readUnary(stream, "quote", GC_ROOTS); - else if (ch == '\\') + else if (ch == '/' && !isspace(streamPeek(stream))) return readUnary(stream, "say", GC_ROOTS); else if (ch == '"') return readString(stream, GC_ROOTS); |
