Your preamble problems have nothing to do with the problem of finding
"The Smallest Free Number" and the surprising thing is it can be done
in O(n); a linear time solution unlike your preamble problems.
If you want to see the intermediate data structures you could you
Observe.lhs from Hood from Hackage.
One can compose functions in any language, the concept you're looking
for is "composability".
Your PowerPoint was pretty good but I know you can do better. (from
Randy Pausch's last lecture)