• + 0 comments

    F#

    let readStringList() = 
        let rec loop acc = 
            let input = Console.ReadLine() 
            if input = null then 
                List.rev acc
            else 
                loop (input :: acc) 
        loop []
    
    let delimiter = Console.ReadLine() |> int
    
    readStringList() 
    |> List.map int // Convert string to int
    |> List.filter (fun x -> x < delimiter) // Filter the list 
    |> List.iter (printfn "%d") // Print the list