git.iko.soy/typeable/nixpkgs
on master help sign in
fix example for foldl
commit448d68c511d43cfc0f1580794daafb2ffb879ce6 authorDrew Mullen <drew@nebulaworks.com> dateThu 7 May 2020, 09:04 (7 years ago) parent2c58b1d
1 file changed+2−2
lib/lists.nix+2−2
lib/lists.nix+2−2
@@ -73,8 +73,8 @@ rec {
7373 lconcat [ "a" "b" "c" ]
7474 => "zabc"
7575 # different types
76− lstrange = foldl (str: int: str + toString (int + 1)) ""
77− strange [ 1 2 3 4 ]
76+ lstrange = foldl (str: int: str + toString (int + 1)) "a"
77+ lstrange [ 1 2 3 4 ]
7878 => "a2345"
7979 */
8080 foldl = op: nul: list: