# HG changeset patch # User Michael Pavone # Date 1406321005 25200 # Node ID ea94b1e43c9720fc47b9fae4f1e8b57c0e19a56f # Parent c0561cb06ee3898617463f4f8ba5bad63be21300 Add foreach to empty list diff -r c0561cb06ee3 -r ea94b1e43c97 modules/list.tp --- a/modules/list.tp Fri Jul 25 08:24:39 2014 -0700 +++ b/modules/list.tp Fri Jul 25 13:43:25 2014 -0700 @@ -4,6 +4,7 @@ empty? <- { true } fold:with <- :acc :fun { acc } foldr:with <- :acc :fun { acc } + foreach <- :self fun { self } map <- :fun { self } | <- :val { list node: val withTail: self