git.iko.soy/typeable/pandoc
on 1.8 help sign in
typeable/pandoc/tests/lhs-test.latex+lhs
39 lines 988 B history raw
1\documentclass{article}
2\usepackage{amssymb,amsmath}
3\usepackage[mathletters]{ucs}
4\usepackage[utf8x]{inputenc}
5\usepackage{listings}
6\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
7\usepackage[breaklinks=true,unicode=true,pdfborder={0 0 0}]{hyperref}
8\setlength{\parindent}{0pt}
9\setlength{\parskip}{6pt plus 2pt minus 1pt}
10\setcounter{secnumdepth}{0}
13\begin{document}
15\section{lhs test}
17\verb!unsplit! is an arrow that takes a pair of values and combines them to
18return a single value:
20\begin{code}
21unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
22unsplit = arr . uncurry
23 -- arr (\op (x,y) -> x `op` y)
24\end{code}
25\verb!(***)! combines two arrows into a new arrow by running the two arrows on
26a pair of values (one arrow on the first item of the pair and one arrow on the
27second item of the pair).
29\begin{verbatim}
30f *** g = first f >>> second g
31\end{verbatim}
32Block quote:
34\begin{quote}
35foo bar
37\end{quote}
39\end{document}