Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
open System
|
||||
open System.IO
|
||||
|
||||
[<EntryPoint>]
|
||||
let main args =
|
||||
let n = Int32.Parse(args.[1]) - 1
|
||||
use r = new StreamReader(args.[0])
|
||||
let lines = Seq.unfold (
|
||||
fun (reader : StreamReader) ->
|
||||
if (reader.EndOfStream) then None
|
||||
else Some(reader.ReadLine(), reader)) r
|
||||
let line = Seq.nth n lines // Seq.nth throws an ArgumentException,
|
||||
// if not not enough lines available
|
||||
Console.WriteLine(line)
|
||||
0
|
||||
Loading…
Add table
Add a link
Reference in a new issue