It just names the threaded value. Did I overlook anything?
Let me point out that if ~> specified an identifier (as suggested in my first response) you could co-mingle two threaded computations, keeping separate concerns that don’t matter as opposed to bundling them up in structs or lists or whatever you have to do if you have only one. At first I thought #:as would you let you do so, but that’s not correct.
It just names the threaded value. Did I overlook anything?
Let me point out that if ~> specified an identifier (as suggested in my first response) you could co-mingle two threaded computations, keeping separate concerns that don’t matter as opposed to bundling them up in structs or lists or whatever you have to do if you have only one. At first I thought #:as would you let you do so, but that’s not correct.
On May 7, 2019, at 1:29 PM, zeRusski <vladile...@gmail.com> wrote:It just names the threaded value. Did I overlook anything?That's right, nothing fancy. Think let-binding the threaded value at that point. #:with id ~ would achieve the same thing, so as it is now #:as is redundant. With #:do both #:with and #:as are redundant, really.Let me point out that if ~> specified an identifier (as suggested in my first response) you could co-mingle two threaded computations, keeping separate concerns that don’t matter as opposed to bundling them up in structs or lists or whatever you have to do if you have only one. At first I thought #:as would you let you do so, but that’s not correct.Ok, this one I don't quite understand. My first thought went as far as to weave multiple computations where each #:as would capture continuations and macro would keep these "threads" separate, but now I'm thinking you mean this:(~> 1 #:as ~a;; now ~a is being threaded(add1 ~a) ;=> 22 #:as ~b;; now ~b is being threaded(add1 ~b) ;=> 3;; simply use whatever ~a was last(+ ~a ~b) ;=> 5#:as ~a;; continue to thread ~a(add1 ~a) ;=> 3(list ~a ~b));; => (list 3 5)
For example, it's better if a threading macro expands using the `#%app`
bound at the macro use site. (Whereas by default, macros expand using
identifiers bound where the macro is defined.)
https://github.com/lexi-lambda/threading/issues/3
Also you might want to treat `quote` forms specially, and not "thread
into" them.
https://github.com/lexi-lambda/threading/issues/2