For tail-recursion, you have to add an additional parameter (an accumulator) to the check
function. Often this is transparent by an additional internal function that's called with the initial value of the accumulator.
let rec check acc fore list =
match list with
| [] -> acc
| h :: t ->
if fore h
then check (h::acc) fore t
else check acc fore t
You may need to do a List.rev
at the end (line three), but in this case it may not be necessary.