Recent snippets

Popular snippets

  • Factory Pattern

    Factory pattern in F#

    82 people like this

    Posted: 14 years ago by Tao Liu

  • 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

  • Composing a list of functions

    Composition of functions in F# is easily achieved by using the >> operator. You can also chain an arbitary amount of functions (represented as a list or sequence) together by folding the list/seq with >>. [More formally: the set of endomorphisms 'a -> 'a forms a monoid with the binary, associative operator ">>" (or "<<") and the neutral element "id".]

    87 people like this

    Posted: 15 years ago by Novox

Snippets by tags

http (18) array (22) sequences (48) tryfsharp (48) list (56) collections (16) learning f# (16) parsing (28) quotations (21) sequence (32) algorithms (25) regex (17) computation builder (17) lazy (20) staging (18) lists (15) string (29) web (29) computation expression (15) generic programming (17)

View all...

Database contains 3208 snippets out of which 1719 is public.