aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinoas <mail@inoas.com>2022-04-05 12:07:54 +0200
committerLouis Pilfold <louis@lpil.uk>2022-04-06 10:58:14 +0100
commit46454eea3b3781b0e5bc93535428464047df3edb (patch)
treec57cc1460c4457b089aee197a1d34f14aafedbf4
parent09af0bb63a55e2e401687b354f380bf26982a01a (diff)
downloadgleam_stdlib-46454eea3b3781b0e5bc93535428464047df3edb.tar.gz
gleam_stdlib-46454eea3b3781b0e5bc93535428464047df3edb.zip
ran gleam format, added change log entry
-rw-r--r--CHANGELOG.md2
-rw-r--r--src/gleam/function.gleam2
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7518a7..c16bea4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
- Fixed a bug where the `string.length` function would cause a JavaScript error
for empty strings on older JavaScript runtimes.
- The `bool` module gains the `to_string` function.
+- The `function` module gains the `tap` function.
## v0.20.0 - 2022-02-22
@@ -64,6 +65,7 @@
- The internal `gleam_stdlib.js` module has been renamed to `gleam_stdlib.mjs`.
## v0.18.0 - 2021-11-23
+
## v0.18.0-rc1 - 2021-11-23
- Converted to use the Gleam build tool, not rebar3.
diff --git a/src/gleam/function.gleam b/src/gleam/function.gleam
index 1ee8d9c..cda59fc 100644
--- a/src/gleam/function.gleam
+++ b/src/gleam/function.gleam
@@ -63,7 +63,7 @@ pub fn constant(value: a) -> fn(b) -> a {
/// calls that function with that argument
/// and returns that argument instead of the function return value.
/// Useful for running synchronous side effects in a pipeline.
-pub fn tap (arg: a, effect: fn (a) -> b) -> a {
+pub fn tap(arg: a, effect: fn(a) -> b) -> a {
effect(arg)
arg
}