interplane.Get Omega
Read in your language

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

branch main Branches Tags History

omega-mv / si / rosetta / exercises / isbn-verifier / isbn-verifier.om

10 lines · 501 bytes Raw Blame History
1note Exercism-style exercise "isbn-verifier": https://exercism.org/tracks/python/exercises/isbn-verifier
2note SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3note isvalid is true when isbn, with its hyphens removed, is a valid ISBN-10: nine digits and a check
4note digit or X (10), such that d1*10 + d2*9 + ... + d10*1 is divisible by 11.
5note Check it with: sh exercise.sh exercises/isbn-verifier
6om2
7fn isvalid isbn view uchar * to bool
8note replace this line with your solution
9trap 13
10end