implicit `fun` was causing trouble in OptiML