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.
私はシーケンスを持っています:
[a b c ...]
そして関数(f x y)。私はこれを取得したい:
(f x y)
(f c (f b (f a 1)))
など..これを行う方法は?
少し適応して削減します。
(reduce #(f %2 %1) 1 [a b c])
(reduce (fn [acc x] (f x acc)) 1 [a b c d])