Skip to content

Define convert for FunctionWrappersWrapper #52

Description

@densmojd

FunctionWrappers.jl defines convert for FunctionWrapper:

Base.convert(::Type{T}, obj) where {T<:FunctionWrapper} = T(obj)
Base.convert(::Type{T}, obj::T) where {T<:FunctionWrapper} = obj

This is really useful if you have, e.g., a struct with a FunctionWrapper field. You can then just provide a Function to the constructor without having to "wrap" it first (at least, I think that's how Julia works).

Can we do something similar for FunctionWrappersWrapper (we = I would submit an MR myself, but I wanted to check I'm not missing an obvious complication first)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions