Improve recursive search by using List.fold

We should get tail recursive..
Also clean 5 and 11 examples a little bit.