Skip to content

Dispatch on Pair #19159

Closed
Closed
@jw3126

Description

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0-dev.975 (2016-10-24 19:00 UTC)
 _/ |\__'_|_|_|\__'_|  |  scan/0929f08* (fork: 5 commits, 16 days)
|__/                   |  x86_64-linux-gnu

julia> f{K}(::Pair{K}) = 1
f (generic function with 1 method)

julia> f{K, V}(::Pair{K, V}) = 2
f (generic function with 2 methods)

julia> f("a"=>123)
1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    types and dispatchTypes, subtyping and method dispatch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions