Skip to content

Commit 724f048

Browse files
authored
update for 1.11, and add note about calls
1 parent e14eb0d commit 724f048

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

base/set.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,15 @@ end
428428
allunique(f, itr) -> Bool
429429
430430
Return `true` if all values from `itr` are distinct when compared with [`isequal`](@ref).
431-
Or if all `f(x) for x in itr` are distinct, for `allunique(f, itr)`.
431+
Or if all of `[f(x) for x in itr]` are distinct, for the second method.
432+
433+
Note that `allunique(f, itr)` may call `f` fewer than `length(itr)` times.
434+
The precise number of calls is regarded as an implementation detail.
432435
433436
See also: [`unique`](@ref), [`issorted`](@ref), [`allequal`](@ref).
434437
435-
!!! compat "Julia 1.10"
436-
The method `allunique(f, itr)` requires at least Julia 1.10.
438+
!!! compat "Julia 1.11"
439+
The method `allunique(f, itr)` requires at least Julia 1.11.
437440
438441
# Examples
439442
```jldoctest
@@ -523,15 +526,18 @@ end
523526
allequal(f, itr) -> Bool
524527
525528
Return `true` if all values from `itr` are equal when compared with [`isequal`](@ref).
526-
Or if all `f(x) for x in itr` are equal, for `allequal(f, itr)`.
529+
Or if all of `[f(x) for x in itr]` are equal, for the second method.
530+
531+
Note that `allequal(f, itr)` may call `f` fewer than `length(itr)` times.
532+
The precise number of calls is regarded as an implementation detail.
527533
528534
See also: [`unique`](@ref), [`allunique`](@ref).
529535
530536
!!! compat "Julia 1.8"
531537
The `allequal` function requires at least Julia 1.8.
532538
533-
!!! compat "Julia 1.10"
534-
The method `allequal(f, itr)` requires at least Julia 1.10.
539+
!!! compat "Julia 1.11"
540+
The method `allequal(f, itr)` requires at least Julia 1.11.
535541
536542
# Examples
537543
```jldoctest

0 commit comments

Comments
 (0)