Console input prompt loop in F# I'm learning F#, starting with baby steps. Is there a way to write this code in a more succint way, while keeping the same semantics? Maybe by using a Seq or something like that?

let rec repeatingPrompt predicate (message:string) =
    Console.WriteLine(message)
    let value = Console.ReadLine()
    if predicate value then
        value
    else
        repeatingPrompt predicate message
You can use Seq.initInfinite and Seq.find to do this, though I'm not sure it's actually better:

let repeatingPrompt predicate (message:string) =
    let prompt _ =
        Console.WriteLine(message)
        Console.ReadLine()

    Seq.initInfinite prompt |&gt; Seq.find predicate