From 2ff6172fd0ceb9dd336981110969b761f5bc1b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Czajka?= <62751+lukaszcz@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:10:11 +0200 Subject: [PATCH] Add specialize pragma for find (#109) * Depends on https://github.com/anoma/juvix/pull/2899 --- Stdlib/Data/List/Base.juvix | 1 + 1 file changed, 1 insertion(+) diff --git a/Stdlib/Data/List/Base.juvix b/Stdlib/Data/List/Base.juvix index 57724709..74f7bce2 100644 --- a/Stdlib/Data/List/Base.juvix +++ b/Stdlib/Data/List/Base.juvix @@ -18,6 +18,7 @@ elem {A} (eq : A → A → Bool) (s : A) : List A → Bool --- 𝒪(𝓃). Returns the leftmost element of the list satisfying the predicate or --- nothing if there's no such element. +{-# specialize: [1] #-} find {A} (predicate : A → Bool) : List A → Maybe A | nil := nothing | (x :: xs) :=