### Baby's First Type

If we're going to use van Laarhoven's trees, we have to create a type and define a

(By the way, we've gone a long way with just a few built-in types. Initially we were using floating point, but that was in fact a bug because of the size of the integers we have to deal with. That leaves

So, how do you create a type in Haskell?

In our earlier code fragment, we supposed we could use a

**meet**operation on it that satisfies the semilattice properties, so it can take its rightful place in the**Semilattice**type class. Then we can use**fromList**to create a tree and search it.(By the way, we've gone a long way with just a few built-in types. Initially we were using floating point, but that was in fact a bug because of the size of the integers we have to deal with. That leaves

**Int**(fixed-size integer),**Integer**(arbitrary-precision integer aka "bignum"), and lists. Aside from Lisp, how many of the languages atop the TIOBE Index could one do this in purely with built-in types?)So, how do you create a type in Haskell?

In our earlier code fragment, we supposed we could use a

**(Int, Integer)**to hold a d-digit Y value and its ordinal position in the list of all d-digit Y values (though not in that order!). Perhaps we can use**type**, which just lets you refer to a type by a name of…