Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-bridge/blob/main/tests/native/hsum.om # omega-bridge Omega-first language interoperability: checked conversion backends and native language bindings Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-bridge / tests / native / hsum.om` 20 lines ยท 402 bytes Raw Blame History 1 note hsum: a unit with private helpers. The compiler enters a function-mode unit at its last function 2 note (word 0 branches there), so only that function is bound; sq and cap are internal calls. 3 fn sq x ulong to ulong 4 ret mul x x 5 end 6 7 fn cap x ulong to ulong 8 if gt x `1000000` 9 trap 9 10 end 11 ret x 12 end 13 14 fn hsum a view uchar 4 b ulong to ulong 15 s = b 16 for i ulong 4 17 s = add s sq ulong get a i 18 end 19 ret cap s 20 end