DEFINE("BIN(N)") :(BIN_END) BIN BIN = (GT(N,1) BIN(N / 2), ) REMDR(N,2) :(RETURN) BIN_ENDThis is guru level stuff.
I'm also grateful to Fred Weigel who first responded to my posting in the Snobol Yahoo! Group and made some very useful suggestions. He points out that Gordon's solution is a prime candidate for DEXP, viz:
dexp('bin(n) = (gt(n, 1) bin(n / 2), ) remdr(n, 2)')That's enough CSNOBOL4 for now, though if you do want to spend some time with it (Windows or Linux), I'd suggest using Rafal M. Sulejman's TkSLIDE.
© Copyright Bruce M. Axtens, 2015
No comments:
Post a Comment