diff options
author | Marcin Puc <marcin.e.puc@gmail.com> | 2021-04-14 23:39:32 +0200 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-04-15 23:03:51 +0100 |
commit | a7ca99d04c9e2f164ce4a6fffc6b39c5e5ff1399 (patch) | |
tree | 8a98a3fadfe418738ac852900ebd2abe4ad2422e | |
parent | 032f840e212f82f9b940fe75cdd4789db9aa2ba2 (diff) | |
download | gleam_stdlib-a7ca99d04c9e2f164ce4a6fffc6b39c5e5ff1399.tar.gz gleam_stdlib-a7ca99d04c9e2f164ce4a6fffc6b39c5e5ff1399.zip |
Add note about performance for list.last
-rw-r--r-- | src/gleam/list.gleam | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gleam/list.gleam b/src/gleam/list.gleam index f99b729..17ee57d 100644 --- a/src/gleam/list.gleam +++ b/src/gleam/list.gleam @@ -1436,6 +1436,10 @@ pub fn scan( /// /// Returns `Error(Nil)` if the list is empty. /// +/// This function runs in linear time. +/// For a collection oriented around performant access at either end, +/// see `gleam/queue.Queue`. +/// /// ## Examples /// /// > last([]) |