Grouping consecutive integers in F# and Haskell

Let's look at what F# and Haskell can offer us while reimplementing grouping consecutive integers in C# algorithm.

F#:

Haskell:

For my current taste, the Haskell version is more readable due to the awesome separate type annotation and to the lovely Erlang-style pattern matching on function arguments.

Comments

Popular posts from this blog

STM: F# vs Haskell

Akka.NET Streams vs Hopac vs AsyncSeq

Regular expressions: Rust vs F# vs Scala