Recent snippets

Popular snippets

  • Haskell function : iterate

    Implements iterate function from Haskell's Prelude. The function generates an infinite sequence by applying a function to the initial value (first) and then to the result of previous application.

    203 people like this

    Posted: 15 years ago by Nick Palladinos

  • Adapter pattern

    Invoke the methods from incompatible types

    111 people like this

    Posted: 15 years ago by Tao Liu

  • Break sequence into n-element subsequences

    I'm working on parallel computations and I thought it would be useful to break work into chunks, especially when processing each element asynchronously is too expensive. The neat thing is that this function is general even though motivation for it is specific. Another neat thing is that this is true lazy sequence unlike what you'd get if you used Seq.groupBy. There are three versions for your enjoyment.

    73 people like this

    Posted: 15 years ago by Dmitri Pavlenkov

Snippets by tags

sequence (32) list (56) collections (16) quotations (21) html (16) generic programming (17) string (29) array (22) algorithms (25) mailboxprocessor (27) staging (18) silverlight (22) agent (20) monad (24) lists (15) math (35) parsing (28) async (98) seq (54) f# (43)

View all...

Database contains 3212 snippets out of which 1719 is public.