bonjour
voici plusieurs heures que je travail sur paramètre general. je sais que mes fonctions (surtout la dernière) ne sont peutetre pas correct mais leurs type me semble bon
val p : 'a -> bool = <fun>
val btree_size_predi : ('a -> bool) -> 'a tree -> int = <fun>
val num_leaves_predi : ('a -> bool) -> 'a tree -> int = <fun>
val arity_counter1_predi : ('a -> bool) -> 'a tree -> int = <fun>
val arity_counter2_predi : ('a -> bool) -> 'a tree -> int = <fun>
val branche_height_predi_1 : ('a -> bool) -> 'a tree -> int = <fun>
val branche_height_predi_all : ('a -> bool) -> 'a tree -> int = <fun>
cependant la fonction
('a -> 'b -> bool) ->
'a ->
('b tree -> int) * ('b tree -> int) * ('b tree -> int) * ('b tree -> int) *
('b tree -> int) * ('b tree -> int) = <fun>
quand je test sur moodle voici le message indiquer
Erreur de type ou fonction inexistante!
Error: This expression has type bool but an expression was expected of type
'a -> bool
--------------------------------
0/100