chickadee » ck-macros » c-ufactorial

(c-ufactorial U) → listsyntax

Unary factorial. If the given list has length zero, yields the list '(u). If the given list has length one, yields the given list. Otherwise, yields a list containing items of the given list repeated (N-1)! times, where N is the length of the given list. This was named c-fact in the original implementation.

(ck () (c-quote (c-ufactorial '(a b c))))
;; ==> '(a b c a b c)
;; Because 3! = 6.