Python scala functional
Guidelines for translating Python functional patterns and simulations to idiomatic Scala.From its SKILL.md
npx -y skills add cxcscmu/SkillLearnBench --skill python-scala-functionalAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
0.7 KB, 155 tokens by cl100k_base, as published. Nobody here has run it
Python to Scala Functional Idioms
Functions and Callables
- Python
Callable[[T], R]-> ScalaT => R. - Python
Optional[T]-> ScalaOption[T].
Overloading and Dispatch
- Python
@overload-> Scala method overloading. - Python
isinstancedispatch -> Scala pattern matching.
Functors and Monads
- Python simulated Functor/Monad -> Scala's built-in
map/flatMappatterns. - Proper Scala implementation should follow the
def map[B](f: A => B): F[B]signature.
Builder Pattern
- Python fluent builder -> Scala class with methods returning
this.typeor new instances for immutability.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.