Task 2 - typechecker.sml

Fixed filter and scan