examples/module-loading/02_demo_with_as.cat
# Demo script using custom namespace name
# Run with: catnip docs/examples/module-loading/02_demo_with_as.cat
# Load module with custom alias
h = import("./docs/examples/module-loading/03_host_module_example.py")
# Use host module functions via custom namespace (h.function())
x = h.add(10, 5)
y = h.multiply(x, 2)
z = h.power(2, 8)
# Call greet function
message = h.greet("Catnip")
# Use Counter class
counter = h.Counter(100)
# Final result
z