; removing spaces
(define (filter pred? xs)
(let loop ((xs xs) (ys '()))
(cond ((null? xs) (reverse ys))
((pred? (car xs))
(loop (cdr xs) (cons (car xs) ys)))
(else (loop (cdr xs) ys)))))
(define (complement f) (lambda xs (not (apply f xs))))
(define (left-section proc . args)
(lambda xs (apply proc (append args xs))))
(define (del-char c str)
(list->string
(filter (complement (left-section char=? c))
(string->list str))))
(display (del-char #\space "Programming Praxis")) (newline)
(display (del-char #\r "Programming Praxis")) (newline)
OyByZW1vdmluZyBzcGFjZXMKCihkZWZpbmUgKGZpbHRlciBwcmVkPyB4cykKICAobGV0IGxvb3AgKCh4cyB4cykgKHlzICcoKSkpCiAgICAoY29uZCAoKG51bGw/IHhzKSAocmV2ZXJzZSB5cykpCiAgICAgICAgICAoKHByZWQ/IChjYXIgeHMpKQogICAgICAgICAgICAobG9vcCAoY2RyIHhzKSAoY29ucyAoY2FyIHhzKSB5cykpKQogICAgICAgICAgKGVsc2UgKGxvb3AgKGNkciB4cykgeXMpKSkpKQoKKGRlZmluZSAoY29tcGxlbWVudCBmKSAobGFtYmRhIHhzIChub3QgKGFwcGx5IGYgeHMpKSkpCgooZGVmaW5lIChsZWZ0LXNlY3Rpb24gcHJvYyAuIGFyZ3MpCiAgKGxhbWJkYSB4cyAoYXBwbHkgcHJvYyAoYXBwZW5kIGFyZ3MgeHMpKSkpCgooZGVmaW5lIChkZWwtY2hhciBjIHN0cikKICAobGlzdC0+c3RyaW5nCiAgICAoZmlsdGVyIChjb21wbGVtZW50IChsZWZ0LXNlY3Rpb24gY2hhcj0/IGMpKQogICAgICAoc3RyaW5nLT5saXN0IHN0cikpKSkKCihkaXNwbGF5IChkZWwtY2hhciAjXHNwYWNlICJQcm9ncmFtbWluZyBQcmF4aXMiKSkgKG5ld2xpbmUpCihkaXNwbGF5IChkZWwtY2hhciAjXHIgIlByb2dyYW1taW5nIFByYXhpcyIpKSAobmV3bGluZSk=