September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -0,0 +1 @@
--- {}

View file

@ -0,0 +1,31 @@
(define (odd_word_problem words)
(letrec ((odd (lambda (s out)
(let loop ((s s) (l '()))
(cond
((null? s)
out)
((pair? s)
(if (<= #\a (car s) #\z)
(loop (cdr s) (cons (car s) l))
(even (cdr s) (cons (cons (reverse l) (car s)) out))))
(else
(loop (s) l))))))
(even (lambda (s out)
(let loop ((s s) (l '()))
(cond
((null? s)
out)
((pair? s)
(if (<= #\a (car s) #\z)
(loop (cdr s) (cons (car s) l))
(odd (cdr s) (cons (cons l (car s)) out))))
(else
(loop (s) l)))))))
(for-each (lambda (p)
(display (runes->string (car p)))
(display (string (cdr p))))
(reverse
(odd (str-iter words) '()))))
(print))
(odd_word_problem "what,is,the;meaning,of:life.")
(odd_word_problem "we,are;not,in,kansas;any,more.")

View file

@ -4,7 +4,7 @@ oFID_ = 'ODDWORD.' /* " " " " "
do case=1 for 2; #=0 /*#: is the number of characters read.*/
iFID=iFID_ || case /*read ODDWORD.IN1 or ODDWORD.IN2 */
oFID=oFID_ || case /*write ODDWORD.1 o r ODDWORD.2 */
oFID=oFID_ || case /*write ODDWORD.1 or ODDWORD.2 */
say; say; say ' reading file: ' iFID "════════" /* ◄■■■■■■■■■ optional. */
do until x==. /* [↓] perform for "odd" words.*/