(halt! system [D])
will halt A, B, C, D
in that order.
(init config [D])
will init only D
, and your system will have only 1 key.
But say you figure out that beside D
you also need to init A, B, C
(it would be nice if these functions were public). What if your config has an independend key E
? If you run (init config [A B C D])
you have lost your E
.
So my approach is something along the lines:
(merge (apply dissoc system changed-keys) (init config changed-keys))
.
And it works pretty well.