bi-directional functions and bi-functions, optionals too