0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[ Clojure ] ネストされたマップでの分割代入についてのメモ

0
Last updated at Posted at 2025-06-13
(def my-data
  {:user-id 123
   :profile {:name "田中太郎"
             :email "tanaka@example.com"}})

(let [{:keys [user-id]
       {:keys [name email]} :profile} my-data]
  (println "ユーザーID:" user-id)
  (println "名前:" name)
  (println "メール:" email))

出力

; ユーザーID: 123
; 名前: 田中太郎
; メール: tanaka@example.com
nil
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?