There's a way to define a category as "arrows-only" single-sorted.
An object is an identity morphism : a → a
https://ncatlab.org/nlab/show/single-sorted+definition+of+a+category
There are Remarks
Specializations
A monoid is a single-sorted category in which s is a constant function (hence so is t, and they are equal).
So when a monoid object is 5, is it expressed like:
(f → 5)(a → a)
or simply
(a → a)(5)
Thanks.
In Haskell it should be
main :: IO ()
main = do
print $ (\f -> 5)(\a -> a)
print $ (\a -> a)(5)
Thanks.
EDIT: to make the problem clearer, I will quote
Categories for the Working Mathematician, I.1 and XII.5.
I.1
XII.5



Consider a category $\mathscr C$ with a single object $X$. Then the one-sorted presentation of $\mathscr C$ will have a collection of morphisms $C = \mathscr C(X, X)$ and functions $s, t : C \to C$ such that $\forall c \in \mathscr C . s(c) = t(c) = \mathrm{id}_X$. That is, $s = t = \lambda c . \mathrm{id}_X$. The composition of morphisms reduces to a binary operation on $C$, because the source and target of each morphism is $\mathrm{id}_X$, and $\mathrm{id}_X$ also acts as an identity for the binary operation. The definition thus reduces exactly to that of a traditional monoid (albeit one with a class of elements, rather than a set of elements, when $\mathscr C$ is not necessarily locally small).
In terms of Haskell, the definition of $s$ and $t$ is therefore given by
\c -> id_X, for someid_X.Therefore, a one-sorted presentation of a category in Haskell may be described by a
Monoid, which we will callX, along with two functionss :: X -> Xandt :: X -> X.sandtare both defined by\x -> mempty X. (Here,memptyis the identity for the monoid.)Alternatively, in Rust:
Since there's still confusion, let me try rephrasing the following quote, which seems to be the issue.
What does this mean?
If we take a monoid $(M, \otimes, I)$, then we can form a single-sorted category $\mathbf C = M$. The functions $s : \mathbf C \to \mathbf C$ and $t : \mathbf C \to \mathbf C$ are both defined to be the constant function $x \mapsto I$. Therefore, the category $\mathbf C$ has a single object, $I$. The composite $a \circ b$ of two morphisms $a, b \in \mathbf C$ is given by $a \otimes b$. The identity is given by $I \in \mathbf C$.
Alternatively, take a single-sorted one-object category $\mathbf C$. Let $U$ be the object of $\mathbf C$ (i.e. the value of $s(x)$ for any $x \in \mathbf C$). We can define a monoid $(M, \otimes, I)$, where $M = \mathbf C$. Given elements $a, b \in M$, we define their multiplication $a \otimes b := a \circ b$. We define $I := \mathrm{id}_U$.
Therefore, the two presentations are equivalent.