Permalink
Browse files

Corrected generator examples for negative numbers.

Added HCAR entry fragement.
  • Loading branch information...
1 parent b794a4e commit 5765052ff4d36c109a670771487d878a407fe149 @m4dc4p committed Oct 21, 2009
Showing with 19 additions and 2 deletions.
  1. +1 −1 .gitignore
  2. +2 −1 CheatSheet.lhs
  3. +16 −0 HaskellCheatSheet-JH.tex
View
@@ -5,7 +5,7 @@ dist
*.exe
# The output of lhs2TeX
-*.tex
+CheatSheet.tex
# Various temporary files from LaTeX
*.aux
View
@@ -166,7 +166,7 @@ interpreter to play with code samples shown.
\begin{compactitem}
\item @[1..10]@ -- List of numbers -- \texttt{1, 2, {\ensuremath\mathellipsis}, 10}.
\item @[100..]@ -- Infinite list of numbers -- \texttt{100, 101, 102, {\ensuremath\mathellipsis}\ }.
- \item @[110..100]@ -- Empty list; ranges only go forwards.
+ \item @[110..100]@ -- Empty list, but @[110, 109 .. 100]@ will give a list from 110 to 100.
\item @[0, -1 ..]@ -- Negative integers.
\item @[-110..-100]@ -- Syntax error; need @[-110.. -100]@ for negatives.
\item @[1,3..99], [-1,3..99]@ -- List from 1 to 99 by 2, -1 to 99 by 4.
@@ -176,6 +176,7 @@ interpreter to play with code samples shown.
\begin{compactitem}
\item @['a' .. 'z']@ -- List of characters -- \texttt{a, b, {\ensuremath\mathellipsis}, z}.
+ \item @['z', 'y' .. 'a']@ -- \texttt{z, y, x, {\ensuremath\mathellipsis}, a}.
\item @[1.0, 1.5 .. 2]@ -- @[1.0,1.5,2.0]@.
\item @[UppercaseLetter ..]@ -- List of @GeneralCategory@ values (from @Data.Char@).
\end{compactitem}
@@ -0,0 +1,16 @@
+\begin{hcarentry}[section,updated]{Haskell Cheat Sheet}
+\report{Justin Bailey}%05/09
+\makeheader
+
+The ``Haskell Cheat Sheet'' covers the syntax, keywords, and other
+language elements of Haskell 98. It is intended for beginning to
+intermediate Haskell programmers and can even serve as a memory aid to
+experts.
+
+The cheat sheet is distributed as a PDF and literate source file. It
+can be downloaded from \url{http://cheatsheet.codeslower.com}. A
+spanish translation is also available.
+
+\FurtherReading
+ \url{http://cheatsheet.codeslower.com}
+\end{hcarentry}

0 comments on commit 5765052

Please sign in to comment.