Run2 scala data abstractions
Idiomatic data modeling with case classes, sealed traits, and exhaustive matching.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_scala-data-abstractionsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
0.6 KB, 115 tokens by cl100k_base, as published. Nobody here has run it
Best Practices
-
Sealed Hierarchy: Ensure all subtypes are known at compile time for exhaustive pattern matching.
sealed trait TokenValue case class StringValue(s: String) extends TokenValue -
Case Classes: Use for data containers. They provide
equals,hashCode,copy, and constructor-based pattern matching out of the box. -
Collections: Prefer
immutable.Seq,Vector, orListfor functional transformations. Useviewfor lazy operations.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.