[Scala language](https://www.scala-lang.org/) is a functional programming language for JVM.
We've noticed that we may generate Smart Contracts in a functional way: function definition is a profunctor (_Intuitively it is a bifunctor where the first argument is contravariant and the second argument is covariant._), arguments and structs are _products_, and so on.
Scala's strictly typed product exists in form of [shapeless heterogenous list](https://github.com/milessabin/shapeless). As arguments or contract data may be referenced by name, we also use Record pattern and reflect these names in type system.
To go beyond the data and function definitions, we use [Free Monad](https://typelevel.org/cats/datatypes/freemonad.html) from a category theory library for Scala named [Cats](https://github.com/typelevel/cats). It lets us _represent stateful computations as data, and run them_.
Running, in our case, means code generation. It is done with a _natural transformation_ from _Crotalinae DSL_ into a _Writer Monad_, which is then converted to a text.
Contracts are exported in [Vyper](https://github.com/ethereum/vyper) language.
It's simple, very readable and comprehensive, and we really like it!
However, it lacks tooling for code reuse: you often need to copy-paste where, say in Solidity, you may call a function from a library.
With _Crotalinae_ you still have _Vyper_ sources at the end, but may take advantages of functional composition to re-use code in different contracts instead of copy-pasting it.