3 ms·
If you want a good (IMHO) example of how Lisp can be made to "meet the problem" so to speak, take a look at this: http://www.flownet.com/ron/lisp/djbec.lisp ht
by lisper 9y ago
If you want a good (IMHO) example of how Lisp can be made to "meet the problem" so to speak, take a look at this:
http://www.flownet.com/ron/lisp/djbec.lisp http://www.flownet.com/ron/lisp/djbec.lisp
and take a look at the functions xpt-add and xpt-double. The details don't really matter. What matters is that what is going on here is a whole bunch of modular arithmetic. The details are described here:
http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html http://www.hyperelliptic.org/EFD/g1p/auto-twisted-extended-1...
Notice how the Lisp code is virtually cut-and-pasted from that page, despite the fact that it's not Lispy syntax, and the mathematical operators are NOT traditional addition, multiplication, etc. These are operations on modular integers and elliptic curve points. And yet the code looks just like the source material from which it was derived.
To make all this magic happen required less than 500 LOC.