Skip to content

Instantly share code, notes, and snippets.

@aviatesk
Last active December 9, 2019 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aviatesk/e8093be84b2ea5aa923d53784aa37aa2 to your computer and use it in GitHub Desktop.
Save aviatesk/e8093be84b2ea5aa923d53784aa37aa2 to your computer and use it in GitHub Desktop.
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