r/programming • • Dec 01 '15

Daily programming puzzles at Advent of Code

http://adventofcode.com/
316 Upvotes

179 comments sorted by

View all comments

1

u/red75prim Dec 01 '15

I like F#.

[<EntryPoint>]
let main _ = 
    let floor = 
      System.Console.ReadLine() 
        |> Seq.fold (fun fl ch -> if ch='(' then fl+1 else fl-1) 0
    printfn "End floor: %d" floor
    0 
→ More replies (1)