aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-02-22 14:08:30 +0000
committerLouis Pilfold <louis@lpil.uk>2024-02-22 14:08:30 +0000
commit6a701d1b1943891ee866e22c5d84800ade8c09f1 (patch)
tree27a9d0c338f47f59baca6310da8f8bb8d9d0e940 /src
parentf36ef4d48887ae490b00f12c032ef5f5016f8f8a (diff)
downloadgleam_stdlib-6a701d1b1943891ee866e22c5d84800ade8c09f1.tar.gz
gleam_stdlib-6a701d1b1943891ee866e22c5d84800ade8c09f1.zip
Deprecate constant, compose
Diffstat (limited to 'src')
-rw-r--r--src/gleam/function.gleam8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gleam/function.gleam b/src/gleam/function.gleam
index 180b6b2..6f42455 100644
--- a/src/gleam/function.gleam
+++ b/src/gleam/function.gleam
@@ -1,6 +1,4 @@
-/// Takes two functions and chains them together to form one function that
-/// takes the input from the first and returns the output of the second.
-///
+@deprecated("Use a fn literal instead, it is easier to understand")
pub fn compose(fun1: fn(a) -> b, fun2: fn(b) -> c) -> fn(a) -> c {
fn(a) { fun2(fun1(a)) }
}
@@ -103,9 +101,7 @@ pub fn identity(x: a) -> a {
x
}
-/// Takes a single argument and returns a new function that
-/// ignores its argument and always returns the input value.
-///
+@deprecated("Use a fn literal instead, it is easier to understand")
pub fn constant(value: a) -> fn(b) -> a {
fn(_) { value }
}