Skip to content

Is Base.Callable OK to use? Should it be documented? #43491

@fingolfin

Description

@fingolfin

There is no docstring for it, it doesn't seem to be covered by the manual. Docstrings even seem to explicitly cover it, e.g.

"""
    replace(new::Function, A; [count::Integer])

Return a copy of `A` where each value `x` in `A` is replaced by `new(x)`.
...
"""
replace(new::Callable, A; count::Integer=typemax(Int)) =
    _replace!(new, _similar_or_copy(A), A, check_count(count))

Yet it seems like a very useful concept, and I've been using it in my code without even questioning how "official" it is. I then was surprised when a colleague didn't know about it, and now I wonder where I first picked it up ... ;-).

Anyway: is it deliberately hidden, or would a patch documenting it be welcome?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions