From d53f6f4d98aabd6f5b28fb110db1da0f6db70a06 Mon Sep 17 00:00:00 2001 From: Oleg Grenrus Date: Sat, 10 Dec 2022 18:10:44 +0200 Subject: Add safe list indexing operator: !? With Joachim's amendments. Implements https://github.com/haskell/core-libraries-committee/issues/110 --- libraries/base/Data/List.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'libraries/base/Data/List.hs') diff --git a/libraries/base/Data/List.hs b/libraries/base/Data/List.hs index d7a5922031..a81c743357 100644 --- a/libraries/base/Data/List.hs +++ b/libraries/base/Data/List.hs @@ -127,6 +127,7 @@ module Data.List -- | These functions treat a list @xs@ as a indexed collection, -- with indices ranging from 0 to @'length' xs - 1@. + , (!?) , (!!) , elemIndex -- cgit v1.2.1