# See the License for the specific language governing permissions and
# limitations under the License.
-# A procedural program (without explicit class definition).
+# Example of a procedural program (without explicit class definition).
# This program manipulates arrays of integers.
-package procedural_array
+module procedural_array
# The sum of the elements of `a'.
# Uses a 'for' control structure.
-meth array_sum(a: Array[Int]): Int
+fun array_sum(a: Array[Int]): Int
do
var sum = 0
for i in a do
# The sum of the elements of `a' (alternative version).
# Uses a 'while' control structure.
-meth array_sum_alt(a: Array[Int]): Int
+fun array_sum_alt(a: Array[Int]): Int
do
var sum = 0
var i = 0