Fix long-standing typo in examples

* dev/examples.el (-tree-mapreduce, -tree-mapreduce-from): Fix typo.
* README.md:
* dash.texi: Regenerate.
master
Basil L. Contovounesios 5 years ago
parent 46e43c0f71
commit 65eeaf6f8b
No known key found for this signature in database
GPG Key ID: 205AB54A5D5D8CFF
  1. 2
      README.md
  2. 4
      dash.texi
  3. 6
      dev/examples.el

@ -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)`

@ -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

@ -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)))

Loading…
Cancel
Save