eufon

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 117cb8be47d22714e4cdd513ab765142926d8cb1
parent b92785f4952de51c9eedb6e060322afc45e8b36a
Author: Daniel Barlow <dan@telent.net>
Date:   Sun, 20 Feb 2022 12:21:39 +0000

remove duplicate code

Diffstat:
Mjust/observable.fnl | 12++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/just/observable.fnl b/just/observable.fnl @@ -6,14 +6,10 @@ (fn update [data self path value] (let [[first & rest] path] (if (next rest) - (do - (update (. data first) self rest value) - (if data._subscribers - (each [_ f (pairs data._subscribers)] (f)))) - (do - (if data._subscribers - (each [_ f (pairs data._subscribers)] (f))) - (tset data first value))))) + (update (. data first) self rest value) + (tset data first value)) + (if data._subscribers + (each [_ f (pairs data._subscribers)] (f))))) (fn get [data self path] (let [[first & rest] path]