(nsbuilder)(defncreate-report"Creates an initial structure for the report."[]{:titlenil:authornil:datenil:content[]:summarynil})(defnset-title"Sets the title of the report."[reporttitle](assocreport:titletitle))(defnset-author"Sets the author of the report."[reportauthor](assocreport:authorauthor))(defnset-date"Sets the date of the report."[reportdate](assocreport:datedate))(defnadd-content"Adds a section to the report content."[reportsection](updatereport:contentconjsection))(defnset-summary"Adds a summary to the report."[reportsummary](assocreport:summarysummary))(defnbuild-report"Validates and returns the finalized report."[report](if(and(:titlereport)(:authorreport)(:contentreport))report(throw(IllegalArgumentException."Invalid report: title, author, and content are mandatory."))))(defngenerate-sample-report[](->(create-report)(set-title"Annual Financial Report")(set-author"Finance Department")(set-date"2024-12-13")(add-content"Introduction to financial results.")(add-content"Analysis of expenses and revenues.")(set-summary"This report provides a detailed overview of the annual financial performance.")(build-report)))(comment(generate-sample-report);; => {:title "Annual Financial Report", ;; :author "Finance Department", ;; :date "2024-12-13", ;; :content ["Introduction to financial results." "Analysis of expenses and revenues."], ;; :summary "This report provides a detailed overview of the annual financial performance."})