OnlineWoerterBuecher.de
Internes

Lexikon


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)

In addition suitable contents:
[ = ] [ ad ] [ address ] [ AI ] [ ai ] [ al ] [ am ] [ an ] [ app ] [ application ] [ ar ] [ arc ] [ as ] [ at ] [ b ] [ be ] [ by ] [ C ] [ ca ] [ cat ] [ cell ] [ ch ] [ co ] [ com ] [ compiler ] [ con ] [ cons ] [ constructor ] [ cu ] [ D ] [ dd ] [ do ] [ du ] [ E ] [ ec ] [ ed ] [ er ] [ era ] [ es ] [ et ] [ fi ] [ file ] [ fo ] [ for ] [ function ] [ ge ] [ gen ] [ gh ] [ gr ] [ h ] [ hing ] [ hr ] [ id ] [ ie ] [ il ] [ in ] [ int ] [ io ] [ is ] [ it ] [ ke ] [ la ] [ ld ] [ Lex ] [ li ] [ location ] [ ls ] [ lt ] [ ly ] [ mm ] [ mo ] [ mod ] [ module ] [ mp ] [ na ] [ nc ] [ ne ] [ ng ] [ ni ] [ no ] [ ns ] [ om ] [ pa ] [ ph ] [ pl ] [ ply ] [ point ] [ pointer ] [ port ] [ pr ] [ primitive ] [ program ] [ programming ] [ pseudo ] [ query ] [ rc ] [ re ] [ recursion ] [ ro ] [ ru ] [ sa ] [ se ] [ sh ] [ si ] [ sit ] [ sk ] [ so ] [ st ] [ struct ] [ su ] [ T ] [ tail recursion ] [ th ] [ to ] [ tr ] [ tt ] [ ve ]






Go Back ]

Free On-line Dictionary of Computing

Copyright © by OnlineWoerterBuecher.de - (3946 Reads)

All logos and trademarks in this site are property of their respective owner.

Page Generation in 0.0914 Seconds, with 16 Database-Queries
Zurück zur Startseite