# HG changeset patch # User Christian Urban # Date 1232026948 0 # Node ID bcbcf5c839ae6ec11273111f94e660f0e6d69e59 # Parent 7b8c4fe235aad717ea39e8ec619da181f95bf2fd used newly exported break reference in ThyOutput for writing separate output_list function diff -r 7b8c4fe235aa -r bcbcf5c839ae CookBook/Appendix.thy --- a/CookBook/Appendix.thy Wed Jan 14 23:44:14 2009 +0000 +++ b/CookBook/Appendix.thy Thu Jan 15 13:42:28 2009 +0000 @@ -7,7 +7,6 @@ chapter {* Recipes *} - end diff -r 7b8c4fe235aa -r bcbcf5c839ae CookBook/FirstSteps.thy --- a/CookBook/FirstSteps.thy Wed Jan 14 23:44:14 2009 +0000 +++ b/CookBook/FirstSteps.thy Thu Jan 15 13:42:28 2009 +0000 @@ -575,7 +575,24 @@ section {* Combinators *} text {* - @{text I}, @{text K} + Perhaps one of the most puzzling aspects for a beginner when looking at + existing Isabelle code is the liberal use of combinators. At first they + seem to obstruct reading the code, but after getting familiar with them + they actually ease the reading and also the programming. + + \begin{readmore} + The most frequently used combinator are defined in @{ML_file "Pure/library.ML"} + and @{ML_file "Pure/General/basics.ML"}. + \end{readmore} + + The simplest combinator is @{ML I} which is just the identidy function. +*} + +ML{*fun I x = x*} + +text {* + Another frequently used combinator is @{ML K} + *} diff -r 7b8c4fe235aa -r bcbcf5c839ae CookBook/antiquote_setup.ML --- a/CookBook/antiquote_setup.ML Wed Jan 14 23:44:14 2009 +0000 +++ b/CookBook/antiquote_setup.ML Thu Jan 15 13:42:28 2009 +0000 @@ -23,8 +23,7 @@ #> (if ! gray then (enclose "\\begin{graybox}%\n" "%\n\\end{graybox}") else I) #> enclose "\\begin{isabelle}%\n" "%\n\\end{isabelle}" else - (*map (Output.output o (if ! ThyOutput.break then Pretty.string_of else Pretty.str_of))*) - map (Output.output o Pretty.str_of) + map (Output.output o (if ! ThyOutput.break then Pretty.string_of else Pretty.str_of)) #> space_implode "\\isasep\\isanewline%\n" #> enclose "\\isa{" "}"); diff -r 7b8c4fe235aa -r bcbcf5c839ae cookbook.pdf Binary file cookbook.pdf has changed