Type piracies
These features are not available in raw Julia, so introducing them should not break anything, except potential ambiguities against other packages.
// falls back to / for general arguments
julia> 1.0 // 2.0
0.5Complex supports eps, precision, ceil and floor
julia> eps(1.0+im)
2.220446049250313e-16
julia> precision(1.0+im)
53
julia> ceil(0.5+0.5im)
1.0 + 1.0im
julia> floor(0.5+0.5im)
0.0 + 0.0imAbstractVector supports Base.front and Base.tail
julia> Base.front([1,2,3])
2-element Vector{Int64}:
1
2
julia> Base.tail(1:10)
2:10Function compositions of Fix
julia> Base.Fix1(+, 1) ∘ Base.Fix1(+, 2) === Base.Fix1(+, 3)
true
julia> Base.Fix2(*, 2) ∘ Base.Fix2(*, 3) === Base.Fix2(*, 6)
true
julia> Base.Fix1(+, 2)^3 === Base.Fix1(+, 6)
true
julia> exp2 ∘ log2 === identity
trueOthers
- Tuple copying
- In raw Julia,
searchsorted,searchsortedfirstandsearchsortedlastonly supportAbstractVectorwhen the starting index and the ending index are specified. The support is now extended to anything that supportsgetindex. summarynow supports several inputs likeprint. The outputs are separated by commas.