Any contribution (PR, review, issues) will be more than welcome! If you are interested, please indicate that you are working on a certain section in the respective issue. You can find the issues here..
To compile
sbt tut
Use ```tut:silent``` for code that is compilable, use ```scala``` otherwise.
Use a line of .............
to separate between code examples.
There are multiple ways to translate haskell code into scala. For scala syntax, generally speaking we follow the common styles in FP scala codebase (e.g. typelevel/cats)
If it's a "standalone" function, use the function syntax, i.e.
val f: A => B = ???
If it is inside a trait or class, use the method, i.e.
def f(a: A) : B = ???
Follow the common strategies in FP codebases, roughly
Create a XXXOps
implicit extension class to support such infix syntax.
E.g. To support (m1: A => Writer[B]) >=> (m2: B => Writer[C])
add
implicit class Kleisli[A, B](m1: A => Writer[B]) {
def >=>[C](m2: B => Writer[C]): A => Writer[C] = ...
Use 2 space indentation and prefer to aggressively break lines
def >=>[C](m2: B => Writer[C]): A => Writer[C]
= { x =>
...
}
If the signature is too long, we break it to multiple lines as well. Control each line to be within 45 characters.
For the prime symbol, use U+16CC RUNIC LETTER SHORT-TWIG-SOL S ᛌ
, it works with scalac while the unicode prime symbol doesn't
This work is licensed under a Creative Commons Attribution 4.0 International License.