The second example is for college undergraduates learning abstract algebra. They come from an algebra course taught by Uri Leron. The procedures model the definition of a group , a mathematical structure made up of a set S and an operation o that satisfy certain requirements. If a teacher recites defnitions for these terms, the student can easily be confused or forget them later. But if each learner develops the ideas through experimentation, they are more likely to form a coherent framework.
Programming languages are a vehicle for that experimentation.
Fans of the latter category are the ones who most strongly suggest that programming is obsolete as an activity for learners. The dichotomy is false. The best software combines a graphical user interface with a powerful extension language. Anything that can be done with a graphical control must also be doable from within a program in the extension language. The algorithm for each graphical control should be accessible and modifiable using the extension language.