Fork me on GitHub
Dustin Paluch16:03:00

In the middle section of this, the code example for layer 3 is

  (fn [_ _]
    (subscribe [:get-name]))
  (fn [name]
    (str "Hello " name)))
It’s not clear to me why there are two functions here.

Dustin Paluch16:03:06

ah, the docstring for reg-sub has the answer.


And with the recent RC, you can write it as (reg-sub :greeting :<- [:get-name] :-> #(str "Hello " %)). :)

👍 1