Skip to content

Commit e854506

Browse files
committed
docs: mention comp
1 parent 3ae9f22 commit e854506

2 files changed

Lines changed: 4 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#### Changed
1313

1414
- The `vector`, `string`, and `average` reducers are now faster and use less memory.
15+
- `comp` is now a macro and uses less memory for long composition chains.
1516

1617
#### Fixed
1718

transducers/utils.lisp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,10 @@
1313
(reversed (reverse (cl:cons function functions))))
1414
`(lambda (&rest ,args)
1515
,(reduce (lambda (data fn)
16-
`(funcall ,fn ,data))
17-
(cdr reversed)
18-
:initial-value `(apply ,(car reversed) ,args)))))
16+
`(funcall ,fn ,data))
17+
(cdr reversed)
18+
:initial-value `(apply ,(car reversed) ,args)))))
1919

20-
#+nil
21-
(macroexpand-1 '(comp (f)))
22-
#+nil
23-
(macroexpand-1 '(comp (f x)))
24-
#+nil
25-
(macroexpand-1 '(comp (f) (g)))
26-
#+nil
27-
(macroexpand-1 '(comp (f x) (g)))
28-
#+nil
29-
(macroexpand-1 '(comp (f x) (g x)))
30-
#+nil
31-
(macroexpand-1 '(comp (const 1337) (lambda (n) (* 2 n)) #'1+))
3220
#+nil
3321
(funcall (comp (const 1337) (lambda (n) (* 2 n)) #'1+) 1)
3422

0 commit comments

Comments
 (0)