feat: allow over to accept multiple functions and compose them

This commit is contained in:
Edward Langley
2023-04-13 09:29:22 -07:00
parent 08302fae40
commit 9c4d29543b
2 changed files with 29 additions and 4 deletions

View File

@ -250,6 +250,12 @@
(5am:is (equalp #(1 2 3)
(funcall (data-lens:over '1+ :result-type 'vector)
'(0 1 2))))
(5am:is (equalp #(2 3 4)
(funcall (data-lens:over '1+ :result-type 'vector '1+)
'(0 1 2))))
(5am:is (equalp #(2 3 4)
(funcall (data-lens:over '1+ '1+ :result-type 'vector)
'(0 1 2))))
(5am:is (equalp #(1 2 3)
(funcall (data-lens:over '1+ :result-type 'vector)
#(0 1 2)))))