Last active
December 14, 2018 10:43
-
-
Save moustachio-belvedere/91e4d955cbb268c3ba88782a15f04d72 to your computer and use it in GitHub Desktop.
This file contains 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
julia> dostuff(a::Real) = println(2*a); | |
julia> dostuff(2.0); | |
4.0 | |
julia> dostuff(2); | |
4 | |
julia> dostuff("2"); | |
ERROR: MethodError: no method matching dostuff(::String) | |
Closest candidates are: | |
dostuff(::Real) at REPL[1]:1 | |
Stacktrace: | |
[1] top-level scope at none:0 | |
julia> domorestuff(a::Float64) = printlnt(2*a); | |
julia> domorestuff(2); | |
ERROR: MethodError: no method matching domorestuff(::Int64) | |
Closest candidates are: | |
domorestuff(::Float64) at REPL[5]:1 | |
Stacktrace: | |
[1] top-level scope at none:0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment