Skip to content

Instantly share code, notes, and snippets.

@bicycle1885
Created June 5, 2015 09:45
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 bicycle1885/35d06634fc22ca92f2dd to your computer and use it in GitHub Desktop.
Save bicycle1885/35d06634fc22ca92f2dd to your computer and use it in GitHub Desktop.
import
# 間違い!
module Hoge
export length
function length()
0
end
end
using Hoge
@show length() # => 0
@show length([1,2,3]) # => no method!
# 正しい!
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