|
|
|
|
|
by kazinator
3804 days ago
|
|
When did Scheme get this "curried define": (define (((f x) y) z) blah)? I'm sure that isn't in R5RS and I don't see it in R7RS. I found a description in the Racket manual. In any case, I like how they are making the context explicit. In the regular math notation for the physics, you just say something like "the Lagrangian for the free particle" and then just spew out something with free variables sticking out of it, like velocity "v". The hacker in me of course asks, how the heck does that work if I have two particles? There is only one v? When we have two, we hand-wave in some subscripts: v1, v2, ... This system makes it explicit: it's the Lagrangian for a particle. So the particle appears as a parameter, and that parameter has accessors on it to retrieve its properties: velocity of the particle, etc. |
|