Course of Raku / Advanced / Modules / Modules basics / Exercises

A shout module

Problem

Create a module named Shouter, in a file Shouter.rakumod, that exports a subroutine shout returning its argument in upper case.

Then write a separate program that uses the module to print shout('hi').

Example

Run with the module on the search path, the program prints:

$ raku -I. shout.raku
HI

Solution

See the solution

Course navigation

Solution: A maths module   |   Solution: A shout module