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-mv/blob/main/si/rosetta/exercises/allergies/allergies.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / si / rosetta / exercises / allergies / allergies.om` 16 lines ยท 795 bytes Raw Blame History 1 note Exercism-style exercise "allergies": https://exercism.org/tracks/python/exercises/allergies 2 note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 3 note The allergens in score order are eggs 1, peanuts 2, shellfish 4, strawberries 8, tomatoes 16, 4 note chocolate 32, pollen 64, cats 128; a score is the sum of the allergens (higher bits are ignored). 5 note allergicto is true when score includes item; list writes the allergens of score, in that order, 6 note joined by commas, into o and returns the number of bytes written. 7 note Check it with: sh exercise.sh exercises/allergies 8 om2 9 fn allergicto item view uchar * score ulong to bool 10 note replace this line with your solution 11 trap 13 12 end 13 fn list score ulong o edit uchar * to ulong 14 note replace this line with your solution 15 trap 13 16 end