Data update
This commit is contained in:
parent
5af6d93694
commit
796d366b97
455 changed files with 7413 additions and 1900 deletions
20
Task/Comma-quibbling/Acornsoft-Lisp/comma-quibbling.lisp
Normal file
20
Task/Comma-quibbling/Acornsoft-Lisp/comma-quibbling.lisp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
(defun examples ()
|
||||
(map '(lambda (words) (printc (quibble words)))
|
||||
'(() (ABC) (ABC DEF) (ABC DEF G H))))
|
||||
|
||||
(defun quibble (words)
|
||||
(implode (list '{ (quibbles words) '})))
|
||||
|
||||
(defun quibbles (words)
|
||||
(implode (conjunction words)))
|
||||
|
||||
(defun conjunction (words)
|
||||
(cond ((null words)
|
||||
'())
|
||||
((null (cdr words))
|
||||
words)
|
||||
((null (cddr words))
|
||||
(list (car words) '! and! (cadr words)))
|
||||
(t
|
||||
(cons (car words)
|
||||
(cons ',! (conjunction (cdr words)))))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue