F# Snippets

Recently added snippets

Popular snippets

  • 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.

    100 people like this
    Posted: 4 years ago by Alex Muscar

  • WPF / SilverLight Converter II

    version 1 is http://fssnip.net/62. This new version support convert from any existing function to a converter function by using composition and pipeline. The convert function is to make the function signature agree to the IValueConverter interface. You can add new functions in the FunctionLibrary module and reuse the class definition to reduce the coding effort. The first sample is to show how to make the converter pipeline work, the second one is a debugger converter used to debug the data binding problem.

    83 people like this
    Posted: 3 years ago by Tao Liu

  • A beautiful fixed-point finding function

    We start with an initial value and then applying f repeatedly, until the value does not change anymore.

    264 people like this
    Posted: 4 years ago by Nick Palladinos

Snippets by tags

list (42) string (15) Seq (44) Lists (13) math (29) reflection (18) MailboxProcessor (22) web (15) DSL (21) lazy (17) Learning F# (15) recursion (24) tutorial (15) monad (18) computation builder (13) game (24) parsing (21) SilverLight (21) Algorithms (23) sequences (43) fold (15) f# (33) WPF (15) Collections (15) Sequence (28) async (79) Design Patterns (18) Kata (16) tryfsharp (44) agent (19)
View all..

Snippets by authors

View all..

Database contains 1594 snippets out of which 1179 are public.