(";      !"#$%&'()*+,-./0123456789:  ;<=>?@ABCDEFG     Printerparsers (injectionprojection pairs) Ha bit of syntactic sugar to avoid hitting the Shift key too many a time The interpreter for printf  It implements Asai'"s accumulator-less alternative to  Danvy's functional unparsing The interpreter for scanf LThe format specification is first-class. One can build format specification  incrementally  This is not the case with OCaml's printf/scanf (where the B format specification has a weird typing and is not first class). Primitive Printer/parsers A better prefixOf function  prefix patt str --> Just str' B if the String patt is the prefix of String str. The result str'  is str with patt removed " Otherwise, the result is Nothing HIJKLMNOPQRSTUVWX Because DList contains the pointer to the current element, DList  is also a Zipper !"#$%&'()*)Representation of the double-linked list +Operations on the DList a ,=In a well-formed list, dl_current must point to a valid node / All operations below preserve well-formedness -.auxiliary function //The insert operation below makes a cyclic list  The other operations don't care 4 Insert to the right of the current element, if any : Return the DL where the inserted node is the current one 01Delete the current element from a non-empty list 0 We can handle both cyclic and terminated lists * The right node becomes the current node. B If the right node does not exists, the left node becomes current 123If no right, just stay inplace 45If no left, just stay inplace 678The following does not anticipate cycles (deliberately) 8Reverse taking: we move left 9Update the current node inplace :@This one watches for a cycle and terminates when it detects one A !"#$%&'()*+,-./0123456789:YZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*%&'() !"#$+,-./0123456789: !"#$!"#$%&'()&'()*+,-./0123456789:       !"#$%&'()*+,-./0123456789:;<=>?   3456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef liboleg-0.1Text.PrintScanFText.PrintScan Data.FDListFScFPr PrinterParserFormattingSpeclitintcharfpp^fmtsprintfsscanfshowreadprefixF:^FPPFChrFIntFLitintpintsDList dl_counter dl_currentdl_memNodenode_val node_left node_rightRefempty well_formedis_empty get_curr_node insert_rightdeleteget_curr move_right move_right' move_left move_left'fromListtakeDL takeDLrevupdatetoListtp1ts1tp2ts2fmt3tp3ts3tp4ts4fmt50fmt5tp5ts5test1ltest1l_rtest1l_ltest1l_ctest2ltest2l_rtest2l_l test2l_l'test2l_ctest3ltest3l_rtest3l_l test3l_l'test3l_ctest31l test31l_r test31l_l test31l_ctest32l test32l_r test32l_l test32l_ctest33l test33l_rtestltestl_rtestl_ltestl_ctestl1testl1_rtestl1_ctestl2testl2_rtestl2_ltestl2_ctestl3testl3_rtestl3_c