In the use of the custom fold function, the lambda form is distracting and unnecessary. The custom fold function is already designed to properly use a binary function as an argument. Instead of: (fold (lambda (next-element acc) (+ next-element acc)) 0 lst) Use: (fold + 0 lst)
@@crfout1 I don’t think it’s much different: one is eta expanded, and it’s not a big insight to say that eta expanding is different. Respectfully: this is just an aesthetic difference, and not as important as you are implying. Eta expansion is discussed later and this example here is used to motivate it
@@krismicinski Is teaching unnecessary complexity the right thing to do? Generic styles can be great, but only after the students understand what "folding over a list" actually means. At least explain up front that the much longer and more complicated version has a different purpose.
I laughed a lot in the motorcycle part :)))) and learned a lot from the tutorial. Thank you for spending a lot of time on these videos.
In the use of the custom fold function, the lambda form is distracting and unnecessary. The custom fold function is already designed to properly use a binary function as an argument.
Instead of:
(fold (lambda (next-element acc) (+ next-element acc)) 0 lst)
Use:
(fold + 0 lst)
@@crfout1 I don’t think it’s much different: one is eta expanded, and it’s not a big insight to say that eta expanding is different. Respectfully: this is just an aesthetic difference, and not as important as you are implying. Eta expansion is discussed later and this example here is used to motivate it
@@krismicinski Is teaching unnecessary complexity the right thing to do? Generic styles can be great, but only after the students understand what "folding over a list" actually means. At least explain up front that the much longer and more complicated version has a different purpose.
@@crfout1 thanks for the criticism, it is appreciated as I work on the next iteration of the course
@@krismicinski I thoroughly enjoyed the UA-cam accessible portion of your course. Thanks for posting it here!