SyFy's blog

By SyFy, 15 years ago, translation, In English
F# and Haskell ?
  • Vote: I like it
  • -3
  • Vote: I do not like it

15 years ago, # |
  Vote: I like it +3 Vote: I do not like it
Please, write sample solution in Haskell and/or F# for any problem from the past rounds.
  • 15 years ago, # ^ |
      Vote: I like it +15 Vote: I do not like it
    Solution for CF14 problem A in Haskell: http://gist.github.com/411776
    Solution for CF14 problem B in F#: http://gist.github.com/411778

    F# has the same power/performance as C#, so adding it to the server would be really nice.
    • 15 years ago, # ^ |
        Vote: I like it +4 Vote: I do not like it
      Done! I've added Haskell (GHC 6.12) and F# 2.0.

      By the way - CF14 problem A in Haskell (http://gist.github.com/411776got Wrong Answer on test 10 :)

      P.S. Thanks to u1ik
      • 15 years ago, # ^ |
          Vote: I like it +1 Vote: I do not like it
        Thank you, that's great! I didn't expect it so soon. Now contests will be more fun for me. :)

        I found a bug in my Haskell solution: I somehow assumed that filtering out empty rows is okay. This doesn't work if an empty row is surrounded by non-empty rows.
        With this fix the solution was accepted, so GHC seems to be working all right.

        P.S. I misplaced my first reply.
      • 15 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it
        So F# is .NET language, isn't it?
        Does it use Mono or Miscrosoft Framework?
15 years ago, # |
  Vote: I like it 0 Vote: I do not like it
Thank you, that's great! I didn't expect it so soon. Now contests will be more fun for me. :)

I found a bug in my Haskell solution: I somehow assumed that filtering out empty rows is okay. This doesn't work if an empty row is surrounded by non-empty rows.
With this fix the solution was accepted, so GHC seems to be working all right.