Dear Simon,
I was always impressed by Haskell, but my "aha" moment was when I realised how great it is as a scripting language. How cool is the fact that you can glue together a bunch of small programs and make a bigger program out of it without toil? Haskell helps you get mundane tasks done while being a pleasure to write (in relative terms)!
There are much better examples online—I love Gabriel Gonzalez' turtle library—but I find the following compelling enough, and anybody can understand more or less what is going on with some explanation:
#!/usr/bin/env stack
-- stack script --resolver lts-10.1 --install-ghc
{-# LANGUAGE TypeApplications #-}
import Data.Maybe (mapMaybe)
import Text.Read (readMaybe)
main :: IO ()
main =
interact
( show @Double
. sum
. mapMaybe readMaybe
. words
)
Good luck with the presentation!
Best,
Vilem