[Haskell-cafe] Why Haskell is beautiful to the novice
Nicola Gigante
nicola.gigante at gmail.com
Fri Aug 28 14:04:28 UTC 2015
> Il giorno 28/ago/2015, alle ore 15:37, Torsten Otto <torsten.otto at hamburg.de> ha scritto:
>
> What an interesting topic to discuss!
>
>> Am 28.08.2015 um 12:12 schrieb Nicola Gigante <nicola.gigante at gmail.com>:
>>
>> Using Haskell (specifically some kind of concepts, e.g. equational reasoning)
>> will also make easier for students to see the connection between math
>> and programming, making them more motivated to learn math as well.
>
> Can you elaborate on that? What would you do in class in terms of „equational reasoning“?
>
It depends on the age of the students and the math they already know.
I don’t have specific examples of in-class exercises or things like that.
However, the point is that writing Haskell code you can
often come up with shorter or more elegant solutions by
manipulating terms exactly as done in elementary algebra.
Starting from a 10lines function and coming up with
a simple and readable oneliner is fun and rewarding,
and shows one of the possible connections to math,
especially if you can make them reason about types,
in which case the task becomes very similar to theorem
proving than to algebraic manipulations alone.
Another possible connection arise when you teach things
such as the Monoid typeclass.
Even if students have not been exposed to abstract
mathematics, they can still appreciate the usefulness of
abstracting similar operations (addition in this case) to
being able to uniformly reason about apparently different
concepts. Abstraction is the core of mathematics, but is
also a fundamental concept in programming, of course,
so you’re implicitly teaching two things at once.
> Regards,
> Torsten
Greetings,
Nicola
More information about the Haskell-Cafe
mailing list