Словари, Словарь Dictionary
! & ( * , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = @ %
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ { ~
T T T- T. T1 T3 TA TB TC TD TE TF TG TH TI TJ TK TL TM TN TO TP TR TS TT TU TV TW TX TY TZ

tail recursion modulo cons

 
 
tail recursion modulo cons A generalisation of 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 /): 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)
на заглавную О сайте10 самыхСловариОбратная связь к началу страницы
© 2010 Admin User
словарь
словарь online
online словарь
цитаты chrome
XHTML | CSS
1.8.11