Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
(use srfi-13);;Syntax for module inclusion depends on implementation,
|
||||
;;a sort function may be predefined, or available through srfi 95
|
||||
(define (mypred? a b)
|
||||
(let ((len-a (string-length a))
|
||||
(len-b (string-length b)))
|
||||
(if (= len-a len-b)
|
||||
(string>? (string-downcase b) (string-downcase a))
|
||||
(> len-a len-b))))
|
||||
|
||||
(sort '("sorted" "here" "strings" "sample" "Some" "are" "be" "to") mypred?)
|
||||
|
|
@ -0,0 +1 @@
|
|||
("strings" "sample" "sorted" "here" "Some" "are" "be" "to")
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
(define strings '(
|
||||
"This" "Is" "A" "Set" "Of" "Strings" "To" "Sort" "duplicated"
|
||||
"this" "is" "a" "set" "of" "strings" "to" "sort" "duplicated"))
|
||||
|
||||
(print
|
||||
(sort strings
|
||||
(lambda two
|
||||
(define sizes (map string-length two))
|
||||
(if (apply = sizes)
|
||||
(apply string-ci<? two)
|
||||
(apply > sizes)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue