aboutsummaryrefslogtreecommitdiff
path: root/pages/projects
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-12-16 19:44:14 +0100
committerAdrian Kummerlaender2014-12-16 19:44:14 +0100
commitea1b360a965d2432e51258e18d9452eb40627682 (patch)
tree56fa3a9430bb226e6b944133c20c68e5eb53fcee /pages/projects
parent2ad9fb4af7968188de91e7c23386f6cc9fece997 (diff)
downloadblog_content-ea1b360a965d2432e51258e18d9452eb40627682.tar
blog_content-ea1b360a965d2432e51258e18d9452eb40627682.tar.gz
blog_content-ea1b360a965d2432e51258e18d9452eb40627682.tar.bz2
blog_content-ea1b360a965d2432e51258e18d9452eb40627682.tar.lz
blog_content-ea1b360a965d2432e51258e18d9452eb40627682.tar.xz
blog_content-ea1b360a965d2432e51258e18d9452eb40627682.tar.zst
blog_content-ea1b360a965d2432e51258e18d9452eb40627682.zip
Added `ConstList` project page
Diffstat (limited to 'pages/projects')
-rw-r--r--pages/projects/const_list.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/pages/projects/const_list.md b/pages/projects/const_list.md
new file mode 100644
index 0000000..09aa036
--- /dev/null
+++ b/pages/projects/const_list.md
@@ -0,0 +1,37 @@
+# ConstList
+
+…is a experimental compile-time functional-style list library written in C++.
+
+The MIT licensed implementation may be found on [Github] or [cgit].
+
+It was written as a experiment in how far one could take the optional compile-time executability offered by `constexpr` specifically and the C++ template metaprogramming facilities in general. While basic _Cons_ structures and appropriate accessor functions turned out to be quite straight forward to implement, the current problem is the absence of workable arbitrary value comparison in a templated context if one doesn't want to be limited to values that can be used as template parameters such as integers. This means that it is currently impossible to e.g. filter a list using `foldr`.
+
+## Current features
+
+- `Cons` class template for representing constant list structures at compile time
+- `make` method template for easily constructing `Cons` structures
+- list constructors such as `make` and `concatenate`
+- basic list accessors such as `size`, `head`, `tail`, `nth` and `take`
+- higher order list operators such as `foldr`, `foldl` and `map`
+- higher order list queries such as `any`, `all`, `none` and `count`
+- special purpose methods such as `reverse`
+- test cases for all of the above
+- MIT license
+
+## Usage example
+
+~~~
+const int sum{
+ ConstList::foldr(
+ ConstList::make(1, 2, 3, 4, 5),
+ [](const int& x, const int& y) {
+ return x + y;
+ },
+ 0
+ )
+}; // => 15
+~~~
+{: .language-cpp}
+
+[Github]: https://github.com/KnairdA/ConstList/
+[cgit]: http://code.kummerlaender.eu/ConstList/