Initial commit
Test (in pplus-core) / in-core (push) Failing after 28m44s

This commit is contained in:
alexm committed 2026-11-12 22:23:48 -05:00
commit 568474d52f
1591 files changed
+528213

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
# origin: Programming+ exercise count-base-proved
# status: unverified; `corpus.py verify` checks it on the pinned compiler
# probe: count_base with its claims as comments, as the matho pane states them
# expect-stdout: 3
def count_base(b: String, t: String) -> Int:
# ensures: result == |{ k in [0, |t|) : t[k] == b }|
var total: Int = 0
for i in range(t.count_codepoints()):
# invariant: total == |{ k in [0, i) : t[k] == b }|
if String(t[codepoint=i]) == b:
total += 1
return total
def main():
print(count_base("A", "GATTACA"))