From 149b8cfa123b2f1c65e5139e1c6dafe052a5cc4d Mon Sep 17 00:00:00 2001 From: Giacomo Cavalieri Date: Mon, 20 Oct 2025 11:03:53 +0200 Subject: [PATCH] deprecate function.tap --- CHANGELOG.md | 4 ++++ src/gleam/function.gleam | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e9e51c5..b23d57f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +- The `tap` function from the `function` module has been deprecated. + ## v0.65.0 - 2025-09-29 - The performance of the `drop_start` function from the `string` module has diff --git a/src/gleam/function.gleam b/src/gleam/function.gleam index 6ae3a621..c5b515f6 100644 --- a/src/gleam/function.gleam +++ b/src/gleam/function.gleam @@ -9,6 +9,7 @@ pub fn identity(x: a) -> a { /// /// Useful for running synchronous side effects in a pipeline. /// +@deprecated("This function has been deprecated. You can bind the value you want to tap to a variable instead.") pub fn tap(arg: a, effect: fn(a) -> b) -> a { effect(arg) arg