From 31251ebd8108b47f25e6282ed2ae9cf832c7967d Mon Sep 17 00:00:00 2001 From: Andrey Orst Date: Mon, 9 Nov 2020 22:34:09 +0300 Subject: fix(core): add missing doc --- core.fnl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'core.fnl') diff --git a/core.fnl b/core.fnl index d22beec..9032ee7 100644 --- a/core.fnl +++ b/core.fnl @@ -380,17 +380,22 @@ ignored. Returns a table of results." (reduce comp (consj fs g f)))) (fn* core.every? + "Test if every item in `tbl' satisfies the `pred'." [pred tbl] (if (empty? tbl) true (pred (. tbl 1)) (every? pred [(unpack tbl 2)]) false)) (fn* core.some + "Test if any item in `tbl' satisfies the `pred'." [pred tbl] (when-let [tbl (seq tbl)] (or (pred (. tbl 1)) (some pred [(unpack tbl 2)])))) -(set core.not-any? (comp #(not $) some)) +(set core.not-any? + (with-meta (comp #(not $) some) + {:fnl/docstring "Test if no item in `tbl' satisfy the `pred'." + :fnl/arglist ["pred" "tbl"]})) (fn& core.complement "Takes a function `f' and returns the function that takes the same -- cgit v1.2.3