From 59a34ea5e525b35986616e45c3a0f0b5e6bfd697 Mon Sep 17 00:00:00 2001 From: Robert Strandh Date: Sat, 10 Aug 2024 13:47:32 +0200 Subject: [PATCH] Provide documentation for SUBSETP. --- Code/TODO.text | 2 +- Code/subsetp.lisp | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Code/TODO.text b/Code/TODO.text index ce2ded5..ac02040 100644 --- a/Code/TODO.text +++ b/Code/TODO.text @@ -71,6 +71,6 @@ cdmt set-difference cdmt nset-difference cdmt set-exclusive-or cdmt nset-exclusive-or -c_mt subsetp +cdmt subsetp cdmt union cdmt nunion diff --git a/Code/subsetp.lisp b/Code/subsetp.lisp index d7a0497..2278ad8 100644 --- a/Code/subsetp.lisp +++ b/Code/subsetp.lisp @@ -50,3 +50,18 @@ key key-supplied-p test test-supplied-p test-not test-not-supplied-p)))) + +(setf (documentation 'subsetp 'function) + (format nil + "Syntax: subsetp list-1 list-2 &key key test test-not~@ + ~%~a~%~%~a~%~%~a~%~%~a~%~@ + Either TEST or TEST-NOT is applied to the result of~@ + applying KEY to an element of LIST-1 and and the result~@ + of applying KEY to an element of LIST-2 in that order.~@ + If for every element E1 of LIST-1, there is an element E2~@ + of LIST-2 such that E1 and E2 satisfy the test, then this~@ + function returns true. Otherwise, it returns false." + *list-1-and-list-2-must-be-proper* + *key* + *key-applied-to-elements-of-list-1-and-list-1* + *test-and-test-not*))