Hi.

I'm starting to learn functional programming with Ruby.
I would like for someone to write me an example of finding the smallest 
number in the list and a sorting algorithm.
I got the concept of map (collect), filter (select, detect and reject) and 
reduce (inject) higher order functions but I don't know how to compose 
algorithms from them.
So please write me those two algorithms or some other simple ones with some 
explanation.
Some links to this subject would be nice also.

Thanks
Haris