From the reference:
All contents (for example, classes and functions) of the source file are contained in the declared package.
So, just creating the source file as follows:
package my.pkg fun f0()=0 fun f1()=1
We can declare functions with the names f0 and f1 directly visible in the package my.pkg . These functions can then be imported and used similarly to classes:
import my.pkg.f0 import my.pkg.f1
Alternatively, using the * syntax:
import my.pkg.*
Ryan hilbert
source share