// Then enrich the implementation so that `GetWorkPermit` // returns `None` if the work permit has expired. static Option <WorkPermit> GetValidWorkPermit(Dictionary <string, Employee> employees, string employeeId) => employees .Lookup(employeeId) .Bind(e => e.WorkPermit) .Where(HasExpired.Negate());
Option <WorkPermit> GetWorkPermitEnriched(Dictionary <string, Employee> people, string employeeId) => people .Lookup(employeeId) .Bind(e => e.WorkPermit) .Where(HasExpired.Negate());