Created
June 5, 2015 09:45
-
-
Save bicycle1885/35d06634fc22ca92f2dd to your computer and use it in GitHub Desktop.
import
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
# 間違い! | |
module Hoge | |
export length | |
function length() | |
0 | |
end | |
end | |
using Hoge | |
@show length() # => 0 | |
@show length([1,2,3]) # => no method! |
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
# 正しい! | |
module Hoge | |
import Base: length | |
export length | |
function length() | |
0 | |
end | |
end | |
using Hoge | |
@show length() # => 0 | |
@show length([1,2,3]) # => 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment