Visitar URL original
Home page | F# Snippets

Recent snippets

Popular snippets

  • Adapter pattern

    Invoke the methods from incompatible types

    111 people like this

    Posted: 15 years ago by Tao Liu

  • The Haskell const function

    The const function is simple, but you can use it to make your code more legible. In this example we convert a unary function to a function of arity 2 (that ignores the second argument). Also by using the flip function from Haskell (which is equally easy to define) you can ignore the first argument.

    119 people like this

    Posted: 15 years ago by Alex Muscar

  • Filtering lists

    Two functions showing how to filter functional lists using the specified predicate. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter.

    77 people like this

    Posted: 15 years ago by Tomas Petricek

Snippets by tags

json (16) kata (17) recursion (33) parsing (28) fold (22) design patterns (18) learning f# (16) math (35) string (29) agent (20) algorithms (25) tryfsharp (48) list (56) reflection (19) monad (24) wpf (20) computation expression (15) http (18) html (16) seq (54)

View all...

Database contains 3212 snippets out of which 1719 is public.