Open utterances-bot opened 3 years ago
I think that it is very useful tool for certain types of use cases, especially when combined with aggregation functions and stuff like that. For instance consider this example with group-by https://github.com/sirherrbatka/cl-data-structures/blob/52914da9448208a66a06e1da7a874ddb9e2969d1/src/dicts/hamt/range-test.lisp#L49 or this little snippet
(~> *input*
(cl-ds.alg:without #'null)
cl-ds.alg:array-elementwise
(cl-ds.math:average :sum 0.0))
Stream functions allow me to write more concise code (and less of it). They are great for pseudo-SQL kind of stuff.
It is not that kind of streams. You are talking about arrow functions:
https://40ants.com/lisp-project-of-the-day/2020/04/0046-arrows.html
Arrow macro is cool. But I am talking about functions in the cl-ds package. Without, array-elementwise, group-by and so one work by creating lazily evaluated streams.
cl-stream
https://40ants.com/lisp-project-of-the-day/2020/08/0149-cl-stream.html