Skip to content

isless for Vector #26189

@haampie

Description

@haampie

We have lexicographical isless for several list types:

('a', 'b') < ('c', 'd') #true
"ab" < "cd" #true

yet we don't have it for Vector:

['a', 'b'] < ['c', 'd'] # ERROR: MethodError: no method matching isless(::Array{Char,1}, ::Array{Char,1})

From a mathematical point of view it might make sense not to have isless for vectors, but for general purpose it seems at least consistent to have it. If it's supported in Base, then so will it be in StaticArrays.jl, which is useful (JuliaArrays/StaticArrays.jl#367).

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions