CoW functional list in C++11.
Functionality loosely follows all the nice stuff you find in Haskell (Prelude). Here's a list of functions that have been implemented so far. If the name is different in Haskell, it is given in italic.
- Constructing lists
cons(:)makeList[...]appenddoes not exist in Haskell in this form...- List operations
mapjoin(++)filterheadlasttailinitnulllengthat(!!)reverse(implemented in terms offoldltherefore found at the end of the code)- Reducing lists (folds)
foldlfoldl1foldrfoldr1- Special folds
concatconcatMap- Zipping and unzipping lists
zipzip3zipWithzipWith3unzipunzip3- Other
applydoes not exist in Haskell...
- Implement more functionality
- Write actual (unit) tests
- More documentation
- Performance?!
If you have any questions or suggestions feel free to write an issue report. You can also send me an email to kevin at my domain.