# Maths - Categorical Programming Languages

Here are some computer languages that may be suitable for coding category theory constructs:

### Squiggol

Bird–Meertens formalism

Code from here.

## Scala Code

Code from here. package scalaz

```package scalaz

trait Category[F[_, _]] {
val id: Id[F]
val compose: Compose[F]

def i[A]: F[A, A] =
id.id[A]

def comp[A, B, C](f: F[B, C], g: F[A, B]): F[A, C] =
compose.compose(f, g)
}

object Category extends Categorys

trait Categorys {
def category[F[_, _]](implicit ii: Id[F], c: Compose[F]): Category[F] = new Category[F] {
val id = ii
val compose = c
}

implicit val Function1Category: Category[Function1] =
category[Function1]

implicit val PartialFunctionCategory: Category[PartialFunction] =
category[PartialFunction]

implicit val `<:<_Category` : Category[<:<] =
category[<:<]

implicit val `=:=_Category` : Category[=:=] =
category[=:=]
}```

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.      The Princeton Companion to Mathematics - This is a big book that attempts to give a wide overview of the whole of mathematics, inevitably there are many things missing, but it gives a good insight into the history, concepts, branches, theorems and wider perspective of mathematics. It is well written and, if you are interested in maths, this is the type of book where you can open a page at random and find something interesting to read. To some extent it can be used as a reference book, although it doesn't have tables of formula for trig functions and so on, but where it is most useful is when you want to read about various topics to find out which topics are interesting and relevant to you.