aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2019-09-15 21:34:53 +0100
committerLouis Pilfold <louis@lpil.uk>2019-09-17 12:59:32 +0100
commit9d282d68b5a2764ab73c2dead1df0b0ab8b8edaa (patch)
tree69de2167e440b2f0414dd1d8d9bc920f3f7d4383 /src
parent0579308bf0559635e3742e7fa634648182d916c5 (diff)
downloadgleam_stdlib-9d282d68b5a2764ab73c2dead1df0b0ab8b8edaa.tar.gz
gleam_stdlib-9d282d68b5a2764ab73c2dead1df0b0ab8b8edaa.zip
Note stdlib sites to be updated
Diffstat (limited to 'src')
-rw-r--r--src/gleam/any.gleam1
-rw-r--r--src/gleam/bool.gleam1
-rw-r--r--src/gleam/list.gleam1
-rw-r--r--src/gleam/map.gleam1
-rw-r--r--src/gleam/order.gleam1
-rw-r--r--src/gleam/tuple.gleam2
6 files changed, 7 insertions, 0 deletions
diff --git a/src/gleam/any.gleam b/src/gleam/any.gleam
index 5f0d5e3..611d4fd 100644
--- a/src/gleam/any.gleam
+++ b/src/gleam/any.gleam
@@ -46,6 +46,7 @@ pub fn list(any, decode) {
|> result.then(_, list_mod.traverse(_, decode))
}
+// TODO: replace struct with Pair
pub external fn struct2(Any) -> Result(struct(Any, Any), String)
= "gleam__stdlib" "decode_struct2"
diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam
index 438c232..81e0cea 100644
--- a/src/gleam/bool.gleam
+++ b/src/gleam/bool.gleam
@@ -7,6 +7,7 @@ pub fn negate(bool) {
}
}
+// TODO: replace struct with Pair
pub fn compare(a, b) {
case struct(a, b) {
| struct(True, True) -> order.Eq
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam
index 7b13760..195e1b5 100644
--- a/src/gleam/list.gleam
+++ b/src/gleam/list.gleam
@@ -187,6 +187,7 @@ pub fn any(list, f) {
}
}
+// TODO: replace struct with Pair
pub fn zip(l1, l2) {
case struct(l1, l2) {
| struct([], _) -> []
diff --git a/src/gleam/map.gleam b/src/gleam/map.gleam
index 5e24816..ba03b78 100644
--- a/src/gleam/map.gleam
+++ b/src/gleam/map.gleam
@@ -88,6 +88,7 @@ pub fn update(dict, key, f) {
}
fn do_fold(list, acc, f) {
+ // TODO: replace struct with Pair
case list {
| [] -> acc
| [struct(k, v) | tail] -> do_fold(tail, f(k, v, acc), f)
diff --git a/src/gleam/order.gleam b/src/gleam/order.gleam
index 48a4b40..5913479 100644
--- a/src/gleam/order.gleam
+++ b/src/gleam/order.gleam
@@ -20,6 +20,7 @@ pub fn to_int(order) {
}
}
+// TODO: replace struct with Pair
pub fn compare(a, b) {
case struct(a, b) {
| struct(Lt, Lt) -> Eq
diff --git a/src/gleam/tuple.gleam b/src/gleam/tuple.gleam
index 03ee14d..88c2a6a 100644
--- a/src/gleam/tuple.gleam
+++ b/src/gleam/tuple.gleam
@@ -1,5 +1,7 @@
import gleam/list
+// TODO: replace struct with Pair
+
pub fn new(a, b) {
struct(a, b)
}