From a7e117da3cb21d1ee63a0e427b8bd5de014b221b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 9 Aug 2013 22:15:51 +0000 Subject: lambda-lists (9aug13), plus remove the lambda.sty copy from skak (CTAN update coming soon) git-svn-id: svn://tug.org/texlive/trunk@31402 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/tex/latex/skak/lambda.sty | 114 --------------------- .../texmf-dist/tex/plain/lambda-lists/lambda.sty | 105 +++++++++++++++++++ 2 files changed, 105 insertions(+), 114 deletions(-) delete mode 100644 Master/texmf-dist/tex/latex/skak/lambda.sty create mode 100644 Master/texmf-dist/tex/plain/lambda-lists/lambda.sty (limited to 'Master/texmf-dist/tex') diff --git a/Master/texmf-dist/tex/latex/skak/lambda.sty b/Master/texmf-dist/tex/latex/skak/lambda.sty deleted file mode 100644 index 2a5c697e663..00000000000 --- a/Master/texmf-dist/tex/latex/skak/lambda.sty +++ /dev/null @@ -1,114 +0,0 @@ -% Filename: Lambda.sty -% Author: Alan Jeffrey -% Last modified: 12 Feb 1990 -% -% This style is (c) 1990 Alan Jeffrey. Permission is granted to make -% copies, as long as -% -% a) no deletions are made, -% -% b) all additions are clearly marked, in amongst all this header information, -% *and* where the addition has been made, and -% -% c) if you make any additions, then change the name of the file -% -% See the Gnu manifesto for details on why software ought to be free. -% -% If you are worrying about the first three clauses, they're just -% there to make sure tons of different styles with the same name -% don't proliferate. If you want to remove a definition, then just -% comment it out (adding a %, not deleting anything). -% -% Tugboat are given permission to publish any or all of this. -% -% This style provides a pile of lambda-calculus and list-handling -% macros of an incredibly obtuse nature. Read Lambda.tex to find out -% what they all do and how they do it. This \TeX\ code was formally -% verified. -% -% Alan Jeffrey, 25 Jan 1990. - -\def\Identity#1{#1} - -\def\Error% - {\errmessage{Abandon verification all - ye who enter here}} - -\def\First#1#2{#1} -\def\Second#1#2{#2} - -\def\Compose#1#2#3{#1{#2{#3}}} - -\def\Twiddle#1#2#3{#1{#3}{#2}} - -\let\True=\First -\let\False=\Second -\let\Not=\Twiddle - -\def\And#1#2{#1{#2}\False} -\def\Or#1#2{#1\True{#2}} - -\def\Lift#1#2#3#4{#1{#4}{#2}{#3}{#4}} - -\def\Lessthan#1#2{\TeXif{\ifnum#1<#2 }} - -\def\gobblefalse\else\gobbletrue\fi#1#2% - {\fi#1} -\def\gobbletrue\fi#1#2% - {\fi#2} -\def\TeXif#1% - {#1\gobblefalse\else\gobbletrue\fi} - -\def\Nil#1#2{#2} -\def\Cons#1#2#3#4{#3{#1}{#2}} -\def\Stream#1{\Cons{#1}{\Stream{#1}}} -\def\Singleton#1{\Cons{#1}\Nil} - -\def\Head#1{#1\First\Error} -\def\Tail#1{#1\Second\Error} - -\def\Foldl#1#2#3% - {#3{\Foldl@{#1}{#2}}{#2}} -\def\Foldl@#1#2#3#4% - {\Foldl{#1}{#1{#2}{#3}}{#4}} -\def\Foldr#1#2#3% - {#3{\Foldr@{#1}{#2}}{#2}} -\def\Foldr@#1#2#3#4% - {#1{#3}{\Foldr{#1}{#2}{#4}}} - -\def\Cat#1#2{\Foldr\Cons{#2}{#1}} - -\def\Reverse{\Foldl{\Twiddle\Cons}\Nil} - -\def\All#1{\Foldr{\Compose\And{#1}}\True} -\def\Some#1{\Foldr{\Compose\Or{#1}}\False} -\def\Isempty{\All{\First\False}} - -\def\Filter#1% - {\Foldr{\Lift{#1}\Cons\Second}\Nil} - -\def\Map#1{\Foldr{\Compose\Cons{#1}}\Nil} - -\def\Insert#1#2#3% - {#3{\Insert@{#1}{#2}}{\Singleton{#2}}} -\def\Insert@#1#2#3#4% - {#1{#2}{#3}% - {\Cons{#2}{\Cons{#3}{#4}}}% - {\Cons{#3}{\Insert{#1}{#2}{#4}}}} -\def\Insertsort#1{\Foldr{\Insert{#1}}\Nil} - -\def\Unlistize#1{[#1\Unlistize@{}]} -\def\Unlistize@#1{#1\Foldr\Commaize{}} -\def\Commaize#1#2{, #1#2} - -\def\Listize[#1]% - {\Listize@#1,\relax]} -\def\Listize@#1,#2]% - {\TeXif{\ifx\relax#2}% - {\Singleton{#1}}% - {\Cons{#1}{\Listize@#2]}}} - -\def\Show#1[#2]% - {\Unlistize{#1{\Listize[#2]}}} - - diff --git a/Master/texmf-dist/tex/plain/lambda-lists/lambda.sty b/Master/texmf-dist/tex/plain/lambda-lists/lambda.sty new file mode 100644 index 00000000000..50c2c97fe86 --- /dev/null +++ b/Master/texmf-dist/tex/plain/lambda-lists/lambda.sty @@ -0,0 +1,105 @@ +% Filename: lambda.sty +% Author: Alan Jeffrey +% Last modified: 12 Feb 1990 (license changed to LPPL: 6 Aug 2013) +% +% Copyright 1990-2013 Alan Jeffrey. +% This file is part of the lambda-lists package. +% +% This work may be distributed and/or modified under the +% conditions of the LaTeX Project Public License, either version 1.3 +% of this license or (at your option) any later version. +% The latest version of this license is in +% http://www.latex-project.org/lppl.txt +% and version 1.3 or later is part of all distributions of LaTeX +% version 2003/12/01 or later. +% +% This style provides a pile of lambda-calculus and list-handling +% macros of an incredibly obtuse nature. Read lambda-lists.tex to find out +% what they all do and how they do it. This \TeX\ code was formally +% verified. +% Alan Jeffrey, 25 Jan 1990. + +\def\Identity#1{#1} + +\def\Error% + {\errmessage{Abandon verification all + ye who enter here}} + +\def\First#1#2{#1} +\def\Second#1#2{#2} + +\def\Compose#1#2#3{#1{#2{#3}}} + +\def\Twiddle#1#2#3{#1{#3}{#2}} + +\let\True=\First +\let\False=\Second +\let\Not=\Twiddle + +\def\And#1#2{#1{#2}\False} +\def\Or#1#2{#1\True{#2}} + +\def\Lift#1#2#3#4{#1{#4}{#2}{#3}{#4}} + +\def\Lessthan#1#2{\TeXif{\ifnum#1<#2 }} + +\def\gobblefalse\else\gobbletrue\fi#1#2% + {\fi#1} +\def\gobbletrue\fi#1#2% + {\fi#2} +\def\TeXif#1% + {#1\gobblefalse\else\gobbletrue\fi} + +\def\Nil#1#2{#2} +\def\Cons#1#2#3#4{#3{#1}{#2}} +\def\Stream#1{\Cons{#1}{\Stream{#1}}} +\def\Singleton#1{\Cons{#1}\Nil} + +\def\Head#1{#1\First\Error} +\def\Tail#1{#1\Second\Error} + +\def\Foldl#1#2#3% + {#3{\Foldl@{#1}{#2}}{#2}} +\def\Foldl@#1#2#3#4% + {\Foldl{#1}{#1{#2}{#3}}{#4}} +\def\Foldr#1#2#3% + {#3{\Foldr@{#1}{#2}}{#2}} +\def\Foldr@#1#2#3#4% + {#1{#3}{\Foldr{#1}{#2}{#4}}} + +\def\Cat#1#2{\Foldr\Cons{#2}{#1}} + +\def\Reverse{\Foldl{\Twiddle\Cons}\Nil} + +\def\All#1{\Foldr{\Compose\And{#1}}\True} +\def\Some#1{\Foldr{\Compose\Or{#1}}\False} +\def\Isempty{\All{\First\False}} + +\def\Filter#1% + {\Foldr{\Lift{#1}\Cons\Second}\Nil} + +\def\Map#1{\Foldr{\Compose\Cons{#1}}\Nil} + +\def\Insert#1#2#3% + {#3{\Insert@{#1}{#2}}{\Singleton{#2}}} +\def\Insert@#1#2#3#4% + {#1{#2}{#3}% + {\Cons{#2}{\Cons{#3}{#4}}}% + {\Cons{#3}{\Insert{#1}{#2}{#4}}}} +\def\Insertsort#1{\Foldr{\Insert{#1}}\Nil} + +\def\Unlistize#1{[#1\Unlistize@{}]} +\def\Unlistize@#1{#1\Foldr\Commaize{}} +\def\Commaize#1#2{, #1#2} + +\def\Listize[#1]% + {\Listize@#1,\relax]} +\def\Listize@#1,#2]% + {\TeXif{\ifx\relax#2}% + {\Singleton{#1}}% + {\Cons{#1}{\Listize@#2]}}} + +\def\Show#1[#2]% + {\Unlistize{#1{\Listize[#2]}}} + + -- cgit v1.2.3