[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: In search of cool Scheme
From: |
Marius Vollmer |
Subject: |
Re: In search of cool Scheme |
Date: |
23 May 2001 01:26:54 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.102 |
"Jorgen 'forcer' Schaefer" <address@hidden> writes:
> The signature of Maciej Stachowiak <address@hidden> contains
> the following nice code:
>
> guile -c '(define c call-with-current-continuation)(define(f s)(lambda(o)(let
> ((n(c(lambda(x)(o x)x))))(let p((n n)(l(string->list s)))(cond((not (null? l)
> )(display(car l))(p(c n)(cdr l))))))))((f"Js nte ul akr")(f"utAohrGieHce\n"))'
That reminds me. I quite like this one. It's not very Scheme or
obfuscated, but it needs bignums. And it's cool. :-)
guile -c "(letrec ((p '(47 86 16 36 82 47 44 40 120 65 87 46 20 47 20 18 23 45
113 113 124 92 106 118 117 34 19)) (x (lambda (p n s)(if (null? p) s (x (cdr p)
n (+ (* n s) (car p))))))) (do ((i 1 (1+ i))) ((> i (length p))) (display
(integer->char (modulo (x p i 0) 127)))))"
Re: In search of cool Scheme, Klaus Schilling, 2001/05/22
- Re: In search of cool Scheme, Hans O. Lowe, 2001/05/22
- Re: In search of cool Scheme, Hans O. Lowe, 2001/05/23
- Re: In search of cool Scheme, Harvey J. Stein, 2001/05/23
- Re: In search of cool Scheme, Hans O. Lowe, 2001/05/23
- Re: In search of cool Scheme, Harvey J. Stein, 2001/05/24