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.
(map vector [1 2 3] [4 5])
あげる:
([1 4] [2 5])
ここで 3 は破棄されます。
短すぎる seq を最大の長さに自動的にパディングしたい場合はどうすればよいですか?
たとえば、取得したい場合の慣用的な方法は何ですか
([1 4] [2 5] [3 nil])
(defn map-all [f & colls] (lazy-seq (when (some seq colls) (cons (apply f (map first colls)) (apply map-all f (map rest colls)))))) (map-all vector [1 2 3] [4 5]) ;=> ([1 4] [2 5] [3 nil])