@use
Imports a pack, whose constructs and datasets are then called under the pack's name.
#Attributes
packThe pack's name, written as the implicit value:
:statistics. An unknown name is refused with the list of packs.Can be written as shorthand:
:valueasA different prefix to call the pack's constructs under. It replaces the pack's own name: under
as: st, statistics.normal does not resolve. It may not be a library construct's name.#Examples
@use:statistics
graph{
statistics.normal(mu: 0; sigma: 1)
}(
x domain: [-4, 4]
y domain: [0, 0.45]
)@use(pack: statistics; as: st)
graph{
st.uniform(a: 0; b: 1)
}#Notes
- The prefix is always written; there is no unqualified import.
normal(…)after:statisticsis unknown nodenormal. - A pack's datasets are reached through the prefix:
#biology.lynx-hare.hare,:#biology.lynx-hare. - Only what the pack exports is reachable: pack
biologydoes not exportnosuch, followed by the list of what it does export. - The constructs are known after the
, inside the construct that holds it. - A pack does not read the document's constants: its defaults hold even where a
declares the same name. - A second import of the same pack needs
as:: prefixstatisticsis already in use by packstatistics— a secondof the same pack needsas:to give it a different one.