Dictionary    Maps    Thesaurus    Translate    Advanced >   


Tip: Click Thesaurus above for synonyms. Also, follow synonym links within the dictionary to find definitions from other sources.

1. The Free On-line Dictionary of Computing (30 December 2018)
tail recursion modulo cons

    A generalisation of tail recursion
   introduced by D.H.D. Warren.  It applies when the last thing a
   function does is to apply a constructor functions (e.g. cons)
   to an application of a non-primitive function.  This is
   transformed into a tail call to the function which is also
   passed a pointer to where its result should be written.  E.g.

   	f []     = []
   	f (x:xs) = 1 : f xs

   is transformed into (pseudo C/Haskell):

   	f [] = []
   	f l  = f' l allocate_cons

   	f' []     p =  *p = nil;
   			return *p
   		      
   	f' (x:xs) p =  cell = allocate_cons;
   		        *p = cell;
   			cell.head = 1;
   			return f' xs &cell.tail
   		      

   where allocate_cons returns the address of a new cons cell, *p
   is the location pointed to by p and &c is the address of c.

   [D.H.D. Warren, DAI Research Report 141, University of
   Edinburgh 1980].

   (1995-03-06)


Common Misspellings >
Most Popular Searches: Define Misanthrope, Define Pulchritudinous, Define Happy, Define Veracity, Define Cornucopia, Define Almuerzo, Define Atresic, Define URL, Definitions Of Words, Definition Of Get Up, Definition Of Quid Pro Quo, Definition Of Irreconcilable Differences, Definition Of Word, Synonyms of Repetitive, Synonym Dictionary, Synonym Antonyms. See our main index and map index for more details.

©2011-2024 ZebraWords.com - Define Yourself - The Search for Meanings and Meaning Means I Mean. All content subject to terms and conditions as set out here. Contact Us, peruse our Privacy Policy