How to replace failure by a list of successes
Proc. of a conference on Functional programming languages and computer architecture
An introduction to the theory of lists
Proceedings of the NATO Advanced Study Institute on Logic of programming and calculi of discrete design
Proceedings of the 1999 international conference on Logic programming
Higher-Order Transformation of Logic Programs
LOPSTR '00 Selected Papers form the 10th International Workshop on Logic Based Program Synthesis and Transformation
Library for systematic search for expressions
AIC'06 Proceedings of the 6th WSEAS International Conference on Applied Informatics and Communications
PRICAI '08 Proceedings of the 10th Pacific Rim International Conference on Artificial Intelligence: Trends in Artificial Intelligence
Algebras for combinatorial search
Journal of Functional Programming
Purely functional lazy non-deterministic programming
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
An analytical inductive functional programming system that avoids unintended programs
PEPM '12 Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation
Purely functional lazy nondeterministic programming
Journal of Functional Programming - Dedicated to ICFP 2009
Algebras for combinatorial search
MSFP'06 Proceedings of the 2006 international conference on Mathematically Structured Functional Programming
Hi-index | 0.00 |
Every functional programmer knows the technique of "replacingfailure by a list of successes" (Wadler, 1985), but wiseprogrammers are aware also of the possibility that the list will beempty or (worse) divergent. In fact, the "lists of successes"technique is equivalent to the incomplete depth-first searchstrategy used in Prolog.At heart, the idea is quite simple:whenever we might want to use a 'multi-function' such as 'f'∶∶ á ↠ â that can return manyresults or none, we replace it by a genuine function f∶∶ α ↠ β stream that returns alazy stream of results, and rely on lazy evaluation to compute theanswers one at a time, and only as they are needed. For the sake ofclarity, I will distinguish between the types of finite lists(α list) and of potentially infinite, lazy streams(α stream), though both may be implemented in the sameway. Following the conventions used in ML, type constructors followtheir argument types.