Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
8
Task/Ordered-words/Common-Lisp/ordered-words-2.lisp
Normal file
8
Task/Ordered-words/Common-Lisp/ordered-words-2.lisp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(defun orderedp (word)
|
||||
(apply #'char<= (coerce word 'list)))
|
||||
|
||||
(let* ((words (uiop:read-file-lines "unixdict.txt"))
|
||||
(ordered (delete-if-not #'orderedp words))
|
||||
(maxlen (apply #'max (mapcar #'length ordered)))
|
||||
(result (delete-if-not (lambda (l) (= l maxlen)) ordered :key #'length)))
|
||||
(format t "~{~A~^, ~}" result))
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import "io" for File
|
||||
import "/sort" for Sort
|
||||
import "./sort" for Sort
|
||||
|
||||
var words = File.read("unixdict.txt").split("\n")
|
||||
var longestLen = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue