Changed hasEntry to use function composition
Finished chapter4