开发者

About unpack in fennel-lang

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜