feat: add length function.

This commit is contained in:
redxef 2025-01-20 20:59:47 +01:00
parent 49bacbffde
commit fef10b5736
Signed by: redxef
GPG key ID: 7DAC3AA211CBD921

View file

@ -74,6 +74,13 @@ namespace Jellyfin.Plugin.SmartPlaylist.Lisp {
(cons (cons (car lst) (car s)) (cdr s))))) (cons (cons (car lst) (car s)) (cdr s)))))
""" """
); );
this["length"] = e.eval(
"""
(lambda
(lst n)
(if (null lst) n (length (cdr lst) (+ n 1))))
"""
);
this["qsort"] = e.eval( this["qsort"] = e.eval(
""" """
(lambda (lambda