Essential session storage is required to sign in. Optional analytics remain off unless you allow them.
Build a small command-line Scala program (a word-frequency counter, an expression calculator, a CSV summarizer). Requirements: prefer val (immutable) over var throughout; model data with a case class and/or a sealed-trait ADT; process input with the collections API (map/filter/foldLeft/groupBy) instead of manual index loops; handle absence or failure with Option or Either — no null, no unguarded exceptions; use PATTERN MATCHING, including a match on a sealed type; and structure it as an sbt project (build.sbt + src/main/scala). Explain one place immutability or pattern matching made the code clearer than the imperative alternative.
val over var; a case class and/or sealed-trait ADT; collections transforms (map/filter/foldLeft/groupBy) instead of manual loops.
Option/Either for absence and failure (no null, no unguarded exceptions); pattern matching, including an exhaustive match on a sealed type.
A working sbt project (build.sbt + src/main/scala) that compiles and runs and actually accomplishes the task.
Use this README structure to make the work reviewable.
DevPath fetches a read-only, size-capped snapshot. Submitted code is never executed.
# A functional CLI or data transformer in Scala ## Goal Build a small command-line Scala program (a word-frequency counter, an expression calculator, a CSV summarizer). Requirements: prefer val (immutable) over var throughout; model data with a case class and/or a sealed-trait ADT; process input with the collections API (map/filter/foldLeft/groupBy) instead of manual index loops; handle absence or failure with Option or Either — no null, no unguarded exceptions; use PATTERN MATCHING, including a match on a sealed type; and structure it as an sbt project (build.sbt + src/main/scala). Explain one place immutability or pattern matching made the code clearer than the imperative alternative. ## Acceptance criteria - [ ] Idiomatic Scala: val over var; a case class and/or sealed-trait ADT; collections transforms (map/filter/foldLeft/groupBy) instead of manual loops. - [ ] Safety & matching: Option/Either for absence and failure (no null, no unguarded exceptions); pattern matching, including an exhaustive match on a sealed type. - [ ] Builds & runs: A working sbt project (build.sbt + src/main/scala) that compiles and runs and actually accomplishes the task. ## Verification - [ ] Document installation and run commands. - [ ] Record automated checks and their exact commands. - [ ] Add representative output, screenshots, or a short demo where useful. - [ ] Confirm failure paths and known constraints. ## Decision log ### Decision title - Context: - Choice: - Alternatives considered: - Tradeoffs: ## Evidence - Link each rubric criterion to the file, test, or artifact that demonstrates it. ## Known limitations - List what is intentionally out of scope and what should be improved next.