This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / New in Version 3.0 / Programming  /
ReplaceList

  • ReplaceList[ expr , rules ] attempts to transform the entire expression expr by applying a rule or list of rules in all possible ways, and returns a list of the results obtained.
  • ReplaceList[ expr , rules , n ] gives a list of at most n results.
  • When no transformation is possible, ReplaceList returns {}.
  • See notes for Replace.
  • See the Mathematica book: Section 2.3.2Section 2.4.1.
  • See also: Cases, StringPosition, Trace, Position, Split.