Julia 1.8.0 DEV Documentationexample composes three functions and maps the result over an array of strings: julia> map(first ∘ reverse ∘ uppercase, split("you can compose functions like this")) 6-element Vector{Char}: 'U': ASCII/Unicode dot vectorization syntax (described below). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Vector{Any}: "A" "tsil" "Of" 7 When combining pipes with anonymous collection in reverse order by iterating over Iterators.reverse(iterator). To actually support reverse-order iteration, however, an iterator type T needs to implement iterate for Iterators.Reverse{T}. (Given0 码力 | 1463 页 | 5.01 MB | 1 年前3
Julia v1.2.0 Documentationfunc�ons and maps the result over an array of strings: 92 CHAPTER 15. FUNCTIONS julia> map(first reverse uppercase, split("you can compose functions like this")) 6-element Array{Char,1}: 'U' 'N' 'E' 'S' dot vectoriza�on syntax (described next). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Array{Any,1}: "A" "tsil" "Of" 7 15.16 Dot Syntax for Vectorizing collec�on in reverse order byitera�ng over Iterators.reverse(iterator). To actuallysupport reverse-orderitera�on, however, an iteratortype T needs to implement iterate for Iterators.Reverse{T}. (Given r::Iterators0 码力 | 1250 页 | 4.29 MB | 1 年前3
Julia 1.2.0 DEV Documentationfunc�ons and maps the result over an array of strings: 94 CHAPTER 16. FUNCTIONS julia> map(first reverse uppercase, split("you can compose functions like this")) 6-element Array{Char,1}: 'U' 'N' 'E' 'S' dot vectoriza�on syntax (described next). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Array{Any,1}: "A" "tsil" "Of" 7 16.16 Dot Syntax for Vectorizing collec�on in reverse order byitera�ng over Iterators.reverse(iterator). To actuallysupport reverse-orderitera�on, however, an iteratortype T needs to implement iterate for Iterators.Reverse{T}. (Given r::Iterators0 码力 | 1252 页 | 4.28 MB | 1 年前3
Julia v1.1.1 Documentationcollec�on in reverse order byitera�ng over Iterators.reverse(iterator). To actuallysupport reverse-orderitera�on, however, an iteratortype T needs to implement iterate for Iterators.Reverse{T}. (Given r::Iterators r::Iterators.Reverse{T}, the underling iterator of type T is r.itr.) In our Squares example, we would implement Iterators.Reverse{Squares} methods: julia> Base.iterate(rS::Iterators.Reverse{Squares}, state=rS state=rS.itr.count) = state < 1 ? nothing : (state*state, state-1) �→ julia> collect(Iterators.reverse(Squares(4))) 4-element Array{Int64,1}: 16 9 4 1 22.2 Indexing For the Squares iterable above0 码力 | 1216 页 | 4.21 MB | 1 年前3
Julia 1.1.0 Documentationcollec�on in reverse order byitera�ng over Iterators.reverse(iterator). To actuallysupport reverse-orderitera�on, however, an iteratortype T needs to implement iterate for Iterators.Reverse{T}. (Given r::Iterators r::Iterators.Reverse{T}, the underling iterator of type T is r.itr.) In our Squares example, we would implement Iterators.Reverse{Squares} methods: julia> Base.iterate(rS::Iterators.Reverse{Squares}, state=rS state=rS.itr.count) = state < 1 ? nothing : (state*state, state-1) �→ julia> collect(Iterators.reverse(Squares(4))) 4-element Array{Int64,1}: 16 9 4 1 22.2 Indexing For the Squares iterable above0 码力 | 1214 页 | 4.21 MB | 1 年前3
julia 1.10.10example composes three functions and maps the result over an array of strings: julia> map(first ∘ reverse ∘ uppercase, split("you can compose functions like this")) 6-element Vector{Char}: 'U': ASCII/Unicode dot vectorization syntax (described below). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Vector{Any}: "A" "tsil" "Of" 7 When combining pipes with anonymous collection in reverse order by iterating over Iterators.reverse(iterator). To actually support reverse-order iteration, however, an iterator type T needs to implement iterate for Iterators.Reverse{T}. (Given0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.9example composes three functions and maps the result over an array of strings: julia> map(first ∘ reverse ∘ uppercase, split("you can compose functions like this")) 6-element Vector{Char}: 'U': ASCII/Unicode dot vectorization syntax (described below). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Vector{Any}: "A" "tsil" "Of" 7 When combining pipes with anonymous collection in reverse order by iterating over Iterators.reverse(iterator). To actually support reverse-order iteration, however, an iterator type T needs to implement iterate for Iterators.Reverse{T}. (Given0 码力 | 1692 页 | 6.34 MB | 3 月前3
Julia 1.10.0 DEV Documentationexample composes three functions and maps the result over an array of strings: julia> map(first ∘ reverse ∘ uppercase, split("you can compose functions like this")) 6-element Vector{Char}: 'U': ASCII/Unicode dot vectorization syntax (described below). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Vector{Any}: "A" "tsil" "Of" 7 When combining pipes with anonymous collection in reverse order by iterating over Iterators.reverse(iterator). To actually support reverse-order iteration, however, an iterator type T needs to implement iterate for Iterators.Reverse{T}. (Given0 码力 | 1678 页 | 5.95 MB | 1 年前3
Julia v1.9.4 Documentationexample composes three functions and maps the result over an array of strings: julia> map(first ∘ reverse ∘ uppercase, split("you can compose functions like this")) 6-element Vector{Char}: 'U': ASCII/Unicode dot vectorization syntax (described below). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Vector{Any}: "A" "tsil" "Of" 7 When combining pipes with anonymous collection in reverse order by iterating over Iterators.reverse(iterator). To actually support reverse-order iteration, however, an iterator type T needs to implement iterate for Iterators.Reverse{T}. (Given0 码力 | 1644 页 | 5.27 MB | 1 年前3
Julia 1.9.0 DEV Documentationexample composes three functions and maps the result over an array of strings: julia> map(first ∘ reverse ∘ uppercase, split("you can compose functions like this")) 6-element Vector{Char}: 'U': ASCII/Unicode dot vectorization syntax (described below). julia> ["a", "list", "of", "strings"] .|> [uppercase, reverse, titlecase, length] 4-element Vector{Any}: "A" "tsil" "Of" 7 When combining pipes with anonymous collection in reverse order by iterating over Iterators.reverse(iterator). To actually support reverse-order iteration, however, an iterator type T needs to implement iterate for Iterators.Reverse{T}. (Given0 码力 | 1633 页 | 5.23 MB | 1 年前3
共 87 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













