We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4afe0f commit efaa0d2Copy full SHA for efaa0d2
Stdlib/Data/List/Base.juvix
@@ -75,6 +75,10 @@ length {A} (list : List A) : Nat :=
75
suc acc
76
};
77
78
+--- 𝒪(𝓃). Find the number of elements in a ;List;. that satisfy a given predicate.
79
+count {A} : (A -> Bool) -> List A -> Nat
80
+ | predicate := filter predicate >> length;
81
+
82
--- 𝒪(𝓃). Returns the given ;List; in reverse order.
83
{-# isabelle-function: {name: "rev"} #-}
84
reverse {A} (list : List A) : List A :=
0 commit comments