Skip to content

Commit

Permalink
Provide documentation for SET-EXCLUSIVE-OR.
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-strandh committed Aug 8, 2024
1 parent e84cc79 commit 4325f21
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Code/TODO.text
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ cdmt adjoin
cd_t pushnew
cdmt set-difference
cdmt nset-difference
c_mt set-exclusive-or
cdmt set-exclusive-or
c_mt nset-exclusive-or
c_mt subsetp
cdmt union
Expand Down
28 changes: 28 additions & 0 deletions Code/set-exclusive-or.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,31 @@
key key-supplied-p
test test-supplied-p
test-not test-not-supplied-p))))

(setf (documentation 'set-exclusive-or 'function)
(format nil
"Syntax: set-exclusive-or 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 some elements E1 of LIST-1 and E2 of LIST-2, the~@
test is satisfied, neither E1 nor E2 is included in the~@
return value of this function. All other elements of~@
LIST-1 and LIST-2 are included in the return value of~@
this function.~@
~@
The order of the elements in teh return value of this~@
function should not be relied upon. If there are duplicate~@
elements E1 and E2 in LIST-1 for which there is no element~@
in LIST-2 that satisfies the test, then both E1 and E2 might~@
be included in the result. If there are duplicate elements~@
E1 and E2 of LIST-2 for which there is no element in LIST-1~@
that satisfies the test, then both E1 and #2 might be~@
included in the result."
*list-1-and-list-2-must-be-proper*
*key*
*key-applied-to-elements-of-list-1-and-list-1*
*test-and-test-not*))


0 comments on commit 4325f21

Please sign in to comment.