Thông tin

Hạn chót Không có hạn chót
Giới hạn nộp bài Không có giới hạn

Đăng nhập

[3.3] Compte [15min]

Définissez les fonctions répondant aux spécifications suivantes :

\begin{align*} & \text{Nom (explicite simple)} & & \texttt{compte f ls} \\ & \text{Nom (explicite terminale)} & & \texttt{compteTerm f ls} \\ & \text{Nom (implicite)} & & \texttt{compteImpl f ls} \\ & \text{Type} & & \texttt{(a -> Bool) -> [a] -> Int} \\ & \text{Conditions} & & - \\ & \text{Résultat} & & \text{le nombre d'éléments de } \texttt{ls} \text{ qui vérifient la condition/propriété } \texttt{f} \end{align*}
Équivalent Python (Cliquez ici)

Le code