From 65eeaf6f8b29d7fca36dfd6dcb12aadf1a871020 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Thu, 28 Jan 2021 22:52:15 +0000 Subject: [PATCH] Fix long-standing typo in examples * dev/examples.el (-tree-mapreduce, -tree-mapreduce-from): Fix typo. * README.md: * dash.texi: Regenerate. --- README.md | 2 +- dash.texi | 4 ++-- dev/examples.el | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index bb8b0fa..3fa054a 100644 --- a/README.md +++ b/README.md @@ -2229,7 +2229,7 @@ but is twice as fast as it only traverse the structure once. ```el (-tree-mapreduce-from 'identity '* 1 '(1 (2 (3 4) (5 6)) (7 (8 9)))) ;; => 362880 (--tree-mapreduce-from (+ it it) (cons it acc) nil '(1 (2 (4 9) (2 1)) (7 (4 3)))) ;; => '(2 (4 (8 18) (4 2)) (14 (8 6))) -(concat "{" (--tree-mapreduce-from (cond ((-cons-pair? it) (concat (symbol-name (car it)) " -> " (symbol-name (cdr it)))) (t (concat (symbol-name it) " : {"))) (concat it (unless (or (equal acc "}") (equal (substring it (1- (length it))) "{")) ", ") acc) "}" '((elips-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam))))) ;; => "{elips-mode : {foo : {bar -> booze}, baz -> qux}, c-mode : {foo -> bla, bum -> bam}}" +(concat "{" (--tree-mapreduce-from (cond ((-cons-pair? it) (concat (symbol-name (car it)) " -> " (symbol-name (cdr it)))) (t (concat (symbol-name it) " : {"))) (concat it (unless (or (equal acc "}") (equal (substring it (1- (length it))) "{")) ", ") acc) "}" '((elisp-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam))))) ;; => "{elisp-mode : {foo : {bar -> booze}, baz -> qux}, c-mode : {foo -> bla, bum -> bam}}" ``` #### -clone `(list)` diff --git a/dash.texi b/dash.texi index 508c35c..eeae650 100644 --- a/dash.texi +++ b/dash.texi @@ -3428,8 +3428,8 @@ but is twice as fast as it only traverse the structure once. @result{} '(2 (4 (8 18) (4 2)) (14 (8 6))) @end group @group -(concat "@{" (--tree-mapreduce-from (cond ((-cons-pair? it) (concat (symbol-name (car it)) " -> " (symbol-name (cdr it)))) (t (concat (symbol-name it) " : @{"))) (concat it (unless (or (equal acc "@}") (equal (substring it (1- (length it))) "@{")) ", ") acc) "@}" '((elips-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam))))) - @result{} "@{elips-mode : @{foo : @{bar -> booze@}, baz -> qux@}, c-mode : @{foo -> bla, bum -> bam@}@}" +(concat "@{" (--tree-mapreduce-from (cond ((-cons-pair? it) (concat (symbol-name (car it)) " -> " (symbol-name (cdr it)))) (t (concat (symbol-name it) " : @{"))) (concat it (unless (or (equal acc "@}") (equal (substring it (1- (length it))) "@{")) ", ") acc) "@}" '((elisp-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam))))) + @result{} "@{elisp-mode : @{foo : @{bar -> booze@}, baz -> qux@}, c-mode : @{foo -> bla, bum -> bam@}@}" @end group @end example @end defun diff --git a/dev/examples.el b/dev/examples.el index e31460c..01e12b3 100644 --- a/dev/examples.el +++ b/dev/examples.el @@ -1200,7 +1200,7 @@ value rather than consuming a list to produce a single value." => "foo bar baz quux qwop" (--tree-mapreduce (if (-cons-pair? it) (list (cdr it)) nil) (append it acc) - '((elips-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam)))) + '((elisp-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam)))) => '(booze qux bla bam)) (defexamples -tree-mapreduce-from @@ -1215,8 +1215,8 @@ value rather than consuming a list to produce a single value." (equal (substring it (1- (length it))) "{")) ", ") acc) "}" - '((elips-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam))))) - => "{elips-mode : {foo : {bar -> booze}, baz -> qux}, c-mode : {foo -> bla, bum -> bam}}") + '((elisp-mode (foo (bar . booze)) (baz . qux)) (c-mode (foo . bla) (bum . bam))))) + => "{elisp-mode : {foo : {bar -> booze}, baz -> qux}, c-mode : {foo -> bla, bum -> bam}}") (defexamples -clone (let* ((a '(1 2 3)) (b (-clone a))) (nreverse a) b) => '(1 2 3)))