diff options
author | Étienne Lévesque <contact@etiennel.dev> | 2022-10-23 17:25:13 -0400 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2022-10-25 14:49:22 +0100 |
commit | 44f719f0993af76b89cc24c4026370bb040725fc (patch) | |
tree | 080c64f342c14ff45ec421705e554b90605e4cac | |
parent | ed7bd3774c46d374c0a466cc0a946fa96fe2003f (diff) | |
download | gleam_stdlib-44f719f0993af76b89cc24c4026370bb040725fc.tar.gz gleam_stdlib-44f719f0993af76b89cc24c4026370bb040725fc.zip |
remove apply4 through apply6
-rw-r--r-- | src/gleam/function.gleam | 51 | ||||
-rw-r--r-- | test/gleam/function_test.gleam | 24 |
2 files changed, 0 insertions, 75 deletions
diff --git a/src/gleam/function.gleam b/src/gleam/function.gleam index ee472d8..432fb39 100644 --- a/src/gleam/function.gleam +++ b/src/gleam/function.gleam @@ -114,54 +114,3 @@ pub fn apply2(fun: fn(a, b) -> value, arg1: a, arg2: b) -> value { pub fn apply3(fun: fn(a, b, c) -> value, arg1: a, arg2: b, arg3: c) -> value { fun(arg1, arg2, arg3) } - -/// Takes a function with arity four and four arguments, -/// calls that function with the arguments -/// and returns the function return value. -/// -/// See `apply1` for more details -/// -pub fn apply4( - fun: fn(a, b, c, d) -> value, - arg1: a, - arg2: b, - arg3: c, - arg4: d, -) -> value { - fun(arg1, arg2, arg3, arg4) -} - -/// Takes a function with arity five and five arguments, -/// calls that function with the arguments -/// and returns the function return value. -/// -/// See `apply1` for more details -/// -pub fn apply5( - fun: fn(a, b, c, d, e) -> value, - arg1: a, - arg2: b, - arg3: c, - arg4: d, - arg5: e, -) -> value { - fun(arg1, arg2, arg3, arg4, arg5) -} - -/// Takes a function with arity six and six arguments, -/// calls that function with the arguments -/// and returns the function return value. -/// -/// See `apply1` for more details -/// -pub fn apply6( - fun: fn(a, b, c, d, e, f) -> value, - arg1: a, - arg2: b, - arg3: c, - arg4: d, - arg5: e, - arg6: f, -) -> value { - fun(arg1, arg2, arg3, arg4, arg5, arg6) -} diff --git a/test/gleam/function_test.gleam b/test/gleam/function_test.gleam index d481893..4034d61 100644 --- a/test/gleam/function_test.gleam +++ b/test/gleam/function_test.gleam @@ -146,27 +146,3 @@ pub fn apply3_test() { |> function.apply3(1, 2, 3) |> should.equal(6) } - -pub fn apply4_test() { - let fun = fn(x1, x2, x3, x4) { x1 + x2 + x3 + x4 } - - fun - |> function.apply4(1, 2, 3, 4) - |> should.equal(10) -} - -pub fn apply5_test() { - let fun = fn(x1, x2, x3, x4, x5) { x1 + x2 + x3 + x4 + x5 } - - fun - |> function.apply5(1, 2, 3, 4, 5) - |> should.equal(15) -} - -pub fn apply6_test() { - let fun = fn(x1, x2, x3, x4, x5, x6) { x1 + x2 + x3 + x4 + x5 + x6 } - - fun - |> function.apply6(1, 2, 3, 4, 5, 6) - |> should.equal(21) -} |