> Date: Thu, 9 Mar 2017 10:21:10 +0200 > From: David Gray <dg...@iesl.forth.gr> > > I'm doing some calculations for GVD in various dielectrics, and I > thought to ask here if anyone knows if there is a less clunky method > of constructing the differential function with a list of constants:
What do you find clunky about this? Would you rather pass in a vector of constants? Would you rather use the autocurrying notation to avoid naming n and nofx separately? (define ((n p1 p2 p3 p4 p5 p6) l) (define (d t b l2) (/ (* t l2) (- l2 b))) (let ((l2 (square l))) (sqrt (+ 1 (d p1 p2 l2) (d p3 p4 l2) (d p5 p6 l2))))) (define n_symbolic (n 'p1 'p2 'p3 'p4 'p5 'p6)) (define n_numeric (n 1.03961212 ...)) (pe ((D n_symbolic) 'x)) ((D n_numeric) 0.8) _______________________________________________ MIT-Scheme-users mailing list MIT-Scheme-users@gnu.org https://lists.gnu.org/mailman/listinfo/mit-scheme-users