mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
fix example for foldl
This commit is contained in:
parent
2c58b1d464
commit
448d68c511
1 changed files with 2 additions and 2 deletions
|
@ -73,8 +73,8 @@ rec {
|
||||||
lconcat [ "a" "b" "c" ]
|
lconcat [ "a" "b" "c" ]
|
||||||
=> "zabc"
|
=> "zabc"
|
||||||
# different types
|
# different types
|
||||||
lstrange = foldl (str: int: str + toString (int + 1)) ""
|
lstrange = foldl (str: int: str + toString (int + 1)) "a"
|
||||||
strange [ 1 2 3 4 ]
|
lstrange [ 1 2 3 4 ]
|
||||||
=> "a2345"
|
=> "a2345"
|
||||||
*/
|
*/
|
||||||
foldl = op: nul: list:
|
foldl = op: nul: list:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue