Improve comment

This commit is contained in:
mike-thompson-day8 2015-04-27 07:38:48 +10:00
parent 65c93cd4d1
commit 5a32049452

View File

@ -190,10 +190,11 @@
(on-changes my-f [:c] [:a] [:b]) (on-changes my-f [:c] [:a] [:b])
Put the middlware above on the right handlers (ones which might change :a or :b. Put the middlware above on the right handlers (ones which might change :a or :b).
It will: It will:
- run 'f' each time the value at path [:a] or [:b] changes - call 'f' each time the value at path [:a] or [:b] changes
- put the return value from f into the path [:c] - call 'f' with the values extracted from [:a] [:b]
- assoc the return value from 'f' into the path [:c]
" "
[f out-path & in-paths] [f out-path & in-paths]
(fn on-changed-middleware (fn on-changed-middleware