From a7ca99d04c9e2f164ce4a6fffc6b39c5e5ff1399 Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Wed, 14 Apr 2021 23:39:32 +0200 Subject: Add note about performance for list.last --- src/gleam/list.gleam | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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([]) -- cgit v1.2.3