Generic operator function with interactive mode