Use partial functions instead of strategy pattern.