aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRJ Dellecese <rjdellecese@gmail.com>2019-12-30 14:08:44 -0500
committerLouis Pilfold <louis@lpil.uk>2019-12-30 22:36:04 +0000
commit0963c69598a617d30d88a412bd4fc392338c4cb4 (patch)
tree558cddcb5d73c25bdf9195f68f5dc0ce4ce143bd /src
parent10af1307dddc5cb89596c92d3fbb5a8c4491eec1 (diff)
downloadgleam_stdlib-0963c69598a617d30d88a412bd4fc392338c4cb4.tar.gz
gleam_stdlib-0963c69598a617d30d88a412bd4fc392338c4cb4.zip
Update changelog and alpha order
Diffstat (limited to 'src')
-rw-r--r--src/gleam/function.gleam12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gleam/function.gleam b/src/gleam/function.gleam
index 35423c0..41ccf67 100644
--- a/src/gleam/function.gleam
+++ b/src/gleam/function.gleam
@@ -1,11 +1,11 @@
-// Takes a function that takes two arguments and returns a new function that
-// takes the same two arguments, but in reverse order.
-pub fn flip(fun: fn(a, b) -> c) -> fn(b, a) -> c {
- fn(b, a) { fun(a, b) }
-}
-
// 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.
pub fn compose(fun1: fn(a) -> b, fun2: fn(b) -> c) -> fn(a) -> c {
fn(a) { fun1(a) |> fun2 }
}
+
+// Takes a function that takes two arguments and returns a new function that
+// takes the same two arguments, but in reverse order.
+pub fn flip(fun: fn(a, b) -> c) -> fn(b, a) -> c {
+ fn(b, a) { fun(a, b) }
+}