plans: tick sieve.hs, progress log 2026-04-25
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled

This commit is contained in:
2026-04-25 18:00:02 +00:00
parent 9be65d7d60
commit d33c520318

View File

@@ -83,7 +83,7 @@ Key mappings:
- [x] Do-notation for a stub `IO` monad (just threading, no real side effects yet)
- [ ] Classic programs in `lib/haskell/tests/programs/`:
- [x] `fib.hs` — infinite Fibonacci stream
- [ ] `sieve.hs` — lazy sieve of Eratosthenes
- [x] `sieve.hs` — lazy sieve of Eratosthenes
- [ ] `quicksort.hs` — naive QS
- [ ] `nqueens.hs`
- [ ] `calculator.hs` — parser combinator style expression evaluator
@@ -114,6 +114,14 @@ Key mappings:
_Newest first._
- **2026-04-25** — Classic program `sieve.hs`: lazy sieve of Eratosthenes.
Added `mod`, `div`, `rem`, `quot` to `hk-binop` (and as first-class
values in `hk-init-env`), enabling backtick operator use. The filter-based
sieve `sieve (p:xs) = p : sieve (filter (\x -> x \`mod\` p /= 0) xs)` works
with the existing lazy cons + Prelude `filter`. 2 new tests in
`lib/haskell/tests/program-sieve.sx` (first 10 primes, 20th prime = 71).
390/390 green.
- **2026-04-25** — First classic program: `fib.hs`. Canonical Haskell
source lives at `lib/haskell/tests/programs/fib.hs` (the
two-cons-cell self-referential fibs definition plus a hand-rolled