txt: ## pred.md
  pred
  
  Combined from primary sources listed below.
  
  # [In enum Bool](#___top "go to top of document")[§](#(enum_Bool)_routine_pred "direct link")
  
  See primary documentation
  [in context](/type/Bool#routine_pred)
  for **routine pred**.
  
  ```raku
  method pred(--> Bool:D)
  ```
  
  Returns `False`.
  
  ```raku
  say True.pred;                                    # OUTPUT: «False␤»
  say False.pred;                                   # OUTPUT: «False␤»
  ```
  
  `pred` is short for "predecessor"; it returns the previous enum value. Bool is a special enum with only two values, `False` and `True`. When sorted, `False` comes first, so `False` is the predecessor to `True`. And since `False` is the "lowest" Bool enum value, its own predecessor is also `False`.
  
  # [In Str](#___top "go to top of document")[§](#(Str)_method_pred "direct link")
  
  See primary documentation
  [in context](/type/Str#method_pred)
  for **method pred**.
  
  ```raku
  method pred(Str:D: --> Str:D)
  ```
  
  Returns the string decremented by one.
  
  String decrementing is "magical" just like string increment (see [succ](/routine/succ)). It fails on underflow
  
  ```raku
  'b0'.pred;           # OUTPUT: «a9»
  'a0'.pred;           # OUTPUT: Failure
  'img002.png'.pred;   # OUTPUT: «img001.png»
  
  ```
  
  # [In role Enumeration](#___top "go to top of document")[§](#(role_Enumeration)_method_pred "direct link")
  
  See primary documentation
  [in context](/type/Enumeration#method_pred)
  for **method pred**.
  
  ```raku
  method pred(::?CLASS:D:)
  ```
  
  ```raku
  say Freija.pred;  # OUTPUT: «Oðin␤»
  
  ```
  
  # [In IO::Path](#___top "go to top of document")[§](#(IO::Path)_method_pred "direct link")
  
  See primary documentation
  [in context](/type/IO/Path#method_pred)
  for **method pred**.
  
  ```raku
  method pred(IO::Path:D: --> IO::Path:D)
  ```
  
  Returns a new `IO::Path` constructed from the invocant, with [`.basename`](/routine/basename) changed by calling [`Str.pred`](/type/Str#method_pred) on it.
  
  ```raku
  "foo/file02.txt".IO.pred.say; # OUTPUT: «"foo/file01.txt".IO␤»
  ```
  
  # [In role Numeric](#___top "go to top of document")[§](#(role_Numeric)_method_pred "direct link")
  
  See primary documentation
  [in context](/type/Numeric#method_pred)
  for **method pred**.
  
  ```raku
  method pred(Numeric:D:)
  ```
  
  Returns the number decremented by one (predecessor).
  
  # [In Allomorph](#___top "go to top of document")[§](#(Allomorph)_method_pred "direct link")
  
  See primary documentation
  [in context](/type/Allomorph#method_pred)
  for **method pred**.
  
  ```raku
  method pred(Allomorph:D:)
  ```
  
  Calls [`Numeric.pred`](/type/Numeric#method_pred) on the invocant's numeric value.
  
  # [In Date](#___top "go to top of document")[§](#(Date)_method_pred "direct link")
  
  See primary documentation
  [in context](/type/Date#method_pred)
  for **method pred**.
  
  ```raku
  method pred(Date:D: --> Date:D)
  ```
  
  Returns a `Date` of the previous day. "pred" is short for "predecessor".
  
  ```raku
  say Date.new("2016-01-01").pred;   # OUTPUT: «2015-12-31␤»
  ```
  