Monthly Archives: June 2021

Types versus sets in math and programming languages

For several years I have been designing and implementing a functional teaching language especially for use in the context of a Discrete Mathematics course. The idea is for students to be exposed to some functional and statically-typed programming early in … Continue reading

Posted in projects, teaching | Tagged , , , , , , | 10 Comments

Competitive programming in Haskell: folding folds

Now that the semester is over—and I will be on sabbatical in the fall!—you can expect a lot more competitive programming in Haskell posts. In a previous post, I challenged you to solve Origami. j0sejuan took me up on the … Continue reading

Posted in competitive programming, haskell | Tagged , , , , , , , | 4 Comments

Average and median via optimization

This is certainly not a new observation, and I’m sure it is folklore and/or contained in various textbooks, but it was amusing to derive it independently. Suppose we have a finite set of real numbers , and we want to … Continue reading

Posted in math | Tagged , , , , | 1 Comment