Solutions for Chapter 6

/cc @fabioyamate @laurocaetano
I don't know if exists. I used `pred` without any specific reason.