Created
September 9, 2014 15:34
-
-
Save SimonDanisch/2b25c12617855fe58db7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function foo(x::Vector{Number}) = println(x) | |
# Will only be callable with Array{Number}, | |
# but not with any subtype of number like Array{Int} | |
function foo{T <: Number}(x::Vector{T}) = println(x) | |
# Will be callable with every Array | |
function foo{T <: Vector{Z <: FloatingPoint}}(x::Vector{T}) = println(x) | |
# Doesn't exist :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment