View source code
							
							
						
								Display the source code in std/algorithm/comparison.d from which this
								page was generated on github.
							
						
							Report a bug
							
						
								If you spot a problem with this page, click here to create a
								Bugzilla issue.
							
						
							
								Improve this page
							
							
					
								Quickly fork, edit online, and submit a pull request for this page.
								Requires a signed-in GitHub account. This works well for small changes.
								If you'd like to make larger changes you may want to consider using
								local clone.
							
						Template std.algorithm.comparison.equal
Compares two or more ranges for equality, as defined by predicate pred
(which is == by default).
						
				template equal(alias pred)
				;
						
					
				Contained Functions
| Name | Description | 
|---|---|
| equal | Compares two or more ranges for equality. The ranges may have
    different element types, as long as all are comparable by means of
    the pred.
    Performs Ο(min(rs[0]) evaluations ofpred. However, ifequalis invoked with the default predicate, the implementation may take the liberty
    to use faster implementations that have the theoretical worst-case
    Ο(max(rs[0]). | 
Example
import stdExample
Tip
equal can itself be used as a predicate to other functions.
This can be very useful when the element type of a range is itself a
range. In particular, equal can be its own predicate, allowing
range of range (of range...) comparisons.
import stdAuthors
License
					Copyright © 1999-2024 by the D Language Foundation | Page generated by ddox.