Re: letter occurence in a text

2012-05-23 Thread gregory benison
On Tue, May 22, 2012 at 7:26 AM, nrichard wrote: > > hello my problem is to count occurence of letter in a text and come out with > an assoc-list like > '((a.16) (b.10) ... (z.5)) Why store the alist keys as one-character strings, rather than just as characters? Storing as characters would be si

Re: letter occurence in a text

2012-05-22 Thread Mark Skilbeck
On Tue, May 22, 2012 at 07:26:09AM -0700, nrichard wrote: > > hello my problem is to count occurence of letter in a text and come out with > an assoc-list like > '((a.16) (b.10) ... (z.5)) > i started a fee function but they don't work so please help me > > ;; an alist > (define lettre '((""."")

letter occurence in a text

2012-05-22 Thread nrichard
compte-char source alist) (let ((p (open-port source))) (let f ((x (read-char p))) (cond ((eof-object? x) (begin (close-input-port p) '())) (else (cons (lettre-test x alist) (f (read-char p)))) -- View this message in context: