Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コードの通常の動作を変更したい
(def a 5) (def b a) (def a 1) b 5
この振る舞いに
(def a 5) (*something* b a) (def a 1) b 1
あくまでも学習用ですので、深い意味はお試しにならないでください。
Jared314 の回答への追加として、a自分自身をアトムまたは参照にbする場合、自動的にへのポインターまたは参照のようなものになることを指摘したいと思いaます。
a
b
(def a (atom 5)) (def b a) @b ;=> 5 (reset! a 1) @b ;=> 1