aboutsummaryrefslogtreecommitdiff
path: root/test/lhs-test.latex
blob: 81c8d89b1afca08c4562787269e4ac2e5de0f8bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\section{lhs test}\label{lhs-test}

\texttt{unsplit} is an arrow that takes a pair of values and combines them to
return a single value:

\begin{Shaded}
\begin{Highlighting}[]
\OtherTok{unsplit ::}\NormalTok{ (}\DataTypeTok{Arrow}\NormalTok{ a) }\OtherTok{=\textgreater{}}\NormalTok{ (b }\OtherTok{{-}\textgreater{}}\NormalTok{ c }\OtherTok{{-}\textgreater{}}\NormalTok{ d) }\OtherTok{{-}\textgreater{}}\NormalTok{ a (b, c) d}
\NormalTok{unsplit }\OtherTok{=}\NormalTok{ arr }\OperatorTok{.} \FunctionTok{uncurry}
          \CommentTok{{-}{-} arr (\textbackslash{}op (x,y) {-}\textgreater{} x \textasciigrave{}op\textasciigrave{} y)}
\end{Highlighting}
\end{Shaded}

\texttt{(***)} combines two arrows into a new arrow by running the two arrows on a
pair of values (one arrow on the first item of the pair and one arrow on the
second item of the pair).

\begin{verbatim}
f *** g = first f >>> second g
\end{verbatim}

Block quote:

\begin{quote}
foo bar
\end{quote}