Recently, I used fennel to write neovim config, and I couldn’t understand the usage of unpack when referring to someone’s project.
(fn group-by [n seq ?from]
(fn f [seq i]
(let [i (+ i n)
j (+ i n -1)]
(when (&l开发者_运维百科t; i (length seq))
(values i (unpack seq i j)))))
(let [start-idx (if (nil? ?from) 1 ?from)]
(values f seq (- start-idx n))))
I read the fennel referenece, not found this usage of unpack.
精彩评论