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-rosetta/blob/main/exercises/eliuds-eggs/.meta/example.om # omega-rosetta aien-dev/omega-rosetta 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-rosetta / exercises / eliuds-eggs / .meta / example.om` 14 lines ยท 409 bytes Raw Blame History 1 note Exercism-style exercise "eliuds-eggs": https://exercism.org/tracks/python/exercises/eliuds-eggs 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note eggcount is the number of 1 bits in the binary representation of n. 4 note Check it with: sh exercise.sh exercises/eliuds-eggs 5 om2 6 fn eggcount n ulong to ulong 7 c = ulong 0 8 v = n 9 while ne v 0 bound 64 10 c = add c and v 1 11 v = shr v 1 12 end 13 ret c 14 end