A Julia module groups related functions, types, constants, and other definitions in a namespace. Separate namespaces let functions share a name without interfering with one another. Define a module with `module` and `end`, and access a definition using its module name, as in `Cylinder.volume`. section 16.1.2 section 4.4
Listing 16.3 Functions with the same name in different modules
module Cylinder
volume(r,h) = π*r^2*h
end
module Cone
volume(r, h) = π*r^2*h/3
end
Cylinder and Cone each define a `volume` function; call them as `Cylinder.volume(2.5, 3)` and `Cone.volume(2.5, 3)`. section 16.1.2
A package and a module are different things. A package bundles source code, resources, and metadata; a module is a Julia language construct. A package defines a module of the same name: `using Dates` loads the Dates module from the Dates package. A practical organization is one module per package. section 16.1.2
Use a standard-library module
Run `using Statistics` to use ready-made functions such as `mean`, `median`, and `std`. In the REPL, enter `?` for documentation mode, or type `Statistics.` and press Tab twice to explore completions. section 4.4
For a growing module, split definitions across files and call `include` inside the module. The included definitions are evaluated in that module. Unlike C/C++ `#include`, Julia’s `include` is a regular function call that returns a result. section 16.2.2 section 16.4
Listing 16.6 ToyGeometry/src/ToyGeometry.jl
module ToyGeometry
include("volume.jl")
include("trig.jl")
end # module
ToyGeometry includes separate files for volume and trigonometry definitions within one module. section 16.2.2
Julia’s bundled functionality largely belongs to `Base`; definitions made at the REPL normally belong to `Main`. To add methods to an existing Base function, import it first. For example, `import Base: -, +` lets angle-specific methods extend those operators rather than creating separate functions that shadow them. section 9.3.2
Use `export sphere_volume` to identify an exported function. A Java-style `public function` declaration is not Julia syntax. section 16.4



































