utop # let is_inside_scene point scene =
List.exists scene
~f:(fun el -> is_inside_scene_element point el)
;;
Error: The function applied to this argument has type 'a list -> bool
This argument cannot be applied with label ~f
However if I change the code to:
let is_inside_scene point scene =
List.exists
(fun el -> is_inside_scene_element point el)
scene
everything works fine. This also seems to match the signature given in the List docs. Is this an error in the book?
when I run this bit of code, utop gives me:
However if I change the code to:
everything works fine. This also seems to match the signature given in the List docs. Is this an error in the book?