# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #132093] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=132093 >
Source code: https://github.com/rakudo/rakudo/blob/nom/src/core/Enumeration.pm#L36-L45 The problem is with this line: my $index = @values.first( self, :k ); Basically, .first will iterate through the elements, but I guess it is possible to store the index of the current enum value and simply increment/decrement it when needed. Some discussion here: https://github.com/rakudo/rakudo/pull/1156#issuecomment-329640201 I think this ticket is closable without tests once the change is implemented.