diff options
author | Louis Pilfold <louis@lpil.uk> | 2021-09-05 19:34:07 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-09-05 19:34:07 +0100 |
commit | 3f15b04f04280dcc1db2ffc684fc98a4a09f5184 (patch) | |
tree | 78254e1910a883362b3e41e1fc0e00fb25133f89 | |
parent | 7a52f1356fe39475b7576ca5f105a10ae975e7ff (diff) | |
download | gleam_stdlib-3f15b04f04280dcc1db2ffc684fc98a4a09f5184.tar.gz gleam_stdlib-3f15b04f04280dcc1db2ffc684fc98a4a09f5184.zip |
Tweak formatting
-rw-r--r-- | src/gleam/list.gleam | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam index 5cfe4a5..283bb3f 100644 --- a/src/gleam/list.gleam +++ b/src/gleam/list.gleam @@ -1473,9 +1473,7 @@ pub fn sized_chunk(in list: List(a), into count: Int) -> List(List(a)) { pub fn reduce(over list: List(a), with fun: fn(a, a) -> a) -> Result(a, Nil) { case list { [] -> Error(Nil) - [head, ..tail] -> - fold(tail, head, fun) - |> Ok + [head, ..tail] -> Ok(fold(tail, head, fun)) } } |