aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/gleam/function_test.gleam34
1 files changed, 0 insertions, 34 deletions
diff --git a/test/gleam/function_test.gleam b/test/gleam/function_test.gleam
index 26919f2..ce3c08f 100644
--- a/test/gleam/function_test.gleam
+++ b/test/gleam/function_test.gleam
@@ -1,37 +1,9 @@
import gleam/function
import gleam/int
-import gleam/list
import gleam/pair
-import gleam/result
import gleam/should
import gleam/string
-pub fn compose_test() {
- let add_two = fn(int: Int) { int + 2 }
- let add_three = fn(int: Int) { int + 3 }
-
- let add_five = function.compose(add_two, add_three)
-
- 1
- |> add_five
- |> should.equal(6)
-
- // Takes a list of ints and returns the first as a string (if there is one, or
- // else "0" if there is not)
- let first_to_string =
- list.first
- |> function.compose(result.unwrap(_, 0))
- |> function.compose(int.to_string)
-
- [1]
- |> first_to_string
- |> should.equal("1")
-
- []
- |> first_to_string
- |> should.equal("0")
-}
-
pub fn curry2_test() {
let fun = fn(a, b) { a + b }
let curried = function.curry2(fun)
@@ -108,12 +80,6 @@ pub fn identity_test() {
|> should.equal(#(1, 2.0))
}
-pub fn constant_test() {
- #(1, 2)
- |> pair.map_first(function.constant(42))
- |> should.equal(#(42, 2))
-}
-
pub fn tap_test() {
"Thanks Joe & Louis"
|> function.tap(fn(s: String) {