diff --git a/libsemigroups_pybind11/froidure_pin.py b/libsemigroups_pybind11/froidure_pin.py index 45dc955c..f7adb87c 100644 --- a/libsemigroups_pybind11/froidure_pin.py +++ b/libsemigroups_pybind11/froidure_pin.py @@ -157,14 +157,10 @@ def __iter__(self: Self) -> Iterator: ######################################################################## def current_elements(self: Self) -> Iterator: - return map( - lambda x: to_py(self.Element, x), self._cxx_obj.current_elements() - ) + return map(lambda x: to_py(self.Element, x), self._cxx_obj.current_elements()) def idempotents(self: Self) -> Iterator: - return map( - lambda x: to_py(self.Element, x), self._cxx_obj.idempotents() - ) + return map(lambda x: to_py(self.Element, x), self._cxx_obj.idempotents()) def sorted_elements(self: Self) -> Iterator: return map( @@ -184,6 +180,10 @@ def generator(self: Self, i: int) -> Element: def sorted_at(self: Self, i: int) -> Element: return self._cxx_obj.sorted_at(i) + @may_return_undefined + def current_position(self: Self, x: Element) -> Element: + return self._cxx_obj.current_position(to_cxx(x)) + ######################################################################## # Helpers -- from froidure-pin.cpp