From a4bb44e2a004d04cbee3ceb2d90aa7461dabecf4 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 13 Mar 2026 15:09:21 +0100 Subject: [FEAT] Update and add Nectar compliant snippet with CL paradigm in mind. Signed-off-by: Amlal El Mahrouss --- example/example_02_nectar/example.nc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'example/example_02_nectar/example.nc') diff --git a/example/example_02_nectar/example.nc b/example/example_02_nectar/example.nc index 46cbd25..fdaadcd 100644 --- a/example/example_02_nectar/example.nc +++ b/example/example_02_nectar/example.nc @@ -1,10 +1,15 @@ -extern sleep; -extern putchar; +extern exit; -const main() { - sleep(1); - putchar(0, '!'); +trait foo { + let exit(); +}; + +let foo.exit() { + exit(0); +} - let foo := 42; - return foo; +const main() { + let self := 0; + foo.exit(); + return 0; } -- cgit v1.2.3