#!/usr/bin/env catnip
# RUN: cd docs/examples/module-loading && catnip 01_demo.cat
# Script de démonstration avec module hôte chargé dans un namespace
# Charger le module hôte
host = import('host_module_example', protocol='py')
# Utiliser les fonctions du module hôte via le namespace (host.function())
x = host.add(10, 5)
y = host.multiply(x, 2)
z = host.power(2, 8)
# Appeler la fonction greet
message = host.greet("Catnip")
# Utiliser la classe Counter
counter = host.Counter(100)
# Résultat final
z # → 256