txt: ## succ.md
  succ
  
  Combined from primary sources listed below.
  
  # [In enum Bool](#___top "go to top of document")[§](#(enum_Bool)_routine_succ "direct link")
  
  See primary documentation
  [in context](/type/Bool#routine_succ)
  for **routine succ**.
  
  ```raku
  method succ(--> Bool:D)
  ```
  
  Returns `True`.
  
  ```raku
  say True.succ;                                    # OUTPUT: «True␤»
  say False.succ;                                   # OUTPUT: «True␤»
  ```
  
  `succ` is short for "successor"; it returns the next enum value. Bool is a special enum with only two values, `False` and `True`. When sorted, `False` comes first, so `True` is its successor. And since `True` is the "highest" Bool enum value, its own successor is also `True`.
  
  # [In Str](#___top "go to top of document")[§](#(Str)_method_succ "direct link")
  
  See primary documentation
  [in context](/type/Str#method_succ)
  for **method succ**.
  
  ```raku
  method succ(Str:D: --> Str:D)
  ```
  
  Returns the string incremented by one.
  
  String increment is "magical". It searches for the last alphanumeric sequence that is not preceded by a dot, and increments it.
  
  ```raku
  '12.34'.succ;      # OUTPUT: «13.34»
  'img001.png'.succ; # OUTPUT: «img002.png»
  ```
  
  The actual increment step works by mapping the last alphanumeric character to a character range it belongs to, and choosing the next character in that range, carrying to the previous letter on overflow.
  
  ```raku
  'aa'.succ;   # OUTPUT: «ab»
  'az'.succ;   # OUTPUT: «ba»
  '109'.succ;  # OUTPUT: «110»
  'α'.succ;    # OUTPUT: «β»
  'a9'.succ;   # OUTPUT: «b0»
  ```
  
  String increment is Unicode-aware, and generally works for scripts where a character can be uniquely classified as belonging to one range of characters.
  
  # [In role Enumeration](#___top "go to top of document")[§](#(role_Enumeration)_method_succ "direct link")
  
  See primary documentation
  [in context](/type/Enumeration#method_succ)
  for **method succ**.
  
  ```raku
  method succ(::?CLASS:D:)
  ```
  
  ```raku
  say Oðin.succ;  # OUTPUT: «Freija␤»
  
  ```
  
  # [In IO::Path](#___top "go to top of document")[§](#(IO::Path)_method_succ "direct link")
  
  See primary documentation
  [in context](/type/IO/Path#method_succ)
  for **method succ**.
  
  ```raku
  method succ(IO::Path:D: --> IO::Path:D)
  ```
  
  Returns a new `IO::Path` constructed from the invocant, with [`.basename`](/routine/basename) changed by calling [`Str.succ`](/type/Str#method_succ) on it.
  
  ```raku
  "foo/file_02.txt".IO.succ.say; # OUTPUT: «"foo/file_03.txt".IO␤»
  ```
  
  # [In role Numeric](#___top "go to top of document")[§](#(role_Numeric)_method_succ "direct link")
  
  See primary documentation
  [in context](/type/Numeric#method_succ)
  for **method succ**.
  
  ```raku
  method succ(Numeric:D:)
  ```
  
  Returns the number incremented by one (successor).
  
  # [In Allomorph](#___top "go to top of document")[§](#(Allomorph)_method_succ "direct link")
  
  See primary documentation
  [in context](/type/Allomorph#method_succ)
  for **method succ**.
  
  ```raku
  method succ(Allomorph:D:)
  ```
  
  Calls [`Numeric.succ`](/type/Numeric#method_succ) on the invocant's numeric value.
  
  # [In Date](#___top "go to top of document")[§](#(Date)_method_succ "direct link")
  
  See primary documentation
  [in context](/type/Date#method_succ)
  for **method succ**.
  
  ```raku
  method succ(Date:D: --> Date:D)
  ```
  
  Returns a `Date` of the following day. "succ" is short for "successor".
  
  ```raku
  say Date.new("2016-02-28").succ;   # OUTPUT: «2016-02-29␤»
  ```
  