73 people like it.
Like the snippet!
Three functions showing how to implement projection for functional lists. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter. The third version extends this with continuation passing.
1: 2: 3: 4: 5: 6: |
|
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: |
|
Link: | http://fssnip.net/n |
Posted: | 13 years ago |
Author: | Tomas Petricek |
Tags: | list , map , recursion , pattern matching , continuation passing |