Run2 scala type classes
Implementing type classes for extensible, ad-hoc polymorphism.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill run2_scala-type-classesAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
0.4 KB, 81 tokens by cl100k_base, as published. Nobody here has run it
Pattern
- Definition: Define a trait
Tc[T]that describes the behavior. - Implicit Instances: Create implicit objects/vals for each type.
- Implicit Parameters: Use
(implicit tc: Tc[T])in methods/constructors. - Syntax (Extension Methods): Create
implicit class ...to provide dot-syntax convenience.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.