Skip to content

Instantly share code, notes, and snippets.

@aviatesk aviatesk/objmethods.jl

Last active Dec 9, 2019
What would you like to do?
methods on objects
const ACS = Union{AbstractChar, AbstractString}
(l::ACS)(f::Function, rs::ACS...) = f(l, rs...)
(l::ACS)(rs::ACS...) = l(*, rs...)
'1'("23") # "123"
']' .|> collect("julia") .|> '[' |> join # "[j][u][l][i][a]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.