[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

Recent snippets

  • Functional wrappers for TryParse APIs

    Exemplary convenience wrappers for some of the System..TryParse APIs, using the combined power of F#' return value deconstruction mechanism via pattern matching, active patterns and option types instead of "out/ref" parameters. Added support for newest versions of F# to determine which overload of TryParse should be used.

    0 people like this

    Posted: 1 month ago by Cody

  • String.Join with pipe

    Just use the concat

    0 people like this

    Posted: 3 months ago by Tuomas Hietanen

  • Nested list functions

    Higher-order functions for working with nested lists that reimplement various useful List module functions, but work on nested lists, preserving the original nesting strucutre when possible.

    4 people like this

    Posted: 4 months ago by Tomas Petricek

Popular snippets

  • Read only ref

    F# implementation of RO_ref from the "Effective ML" talk.

    90 people like this

    Posted: 14 years ago by fholm

  • Struct Tuple

    Two/Three/Four-element generic tuples implemented as a value types for writing more efficient F# code.

    76 people like this

    Posted: 14 years ago by fholm

  • Dynamic operator using Reflection

    Demonstrates how to implement the dynamic operator (?) using .NET Reflection. The implementation supports calling constructors, propreties and methods using simple overload resolution (based on parameter count). It handles instance as well as static members.

    71 people like this

    Posted: 14 years ago by Tomas Petricek

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

    90 people like this

    Posted: 13 years ago by Tao Liu

  • Projecting lists

    Three functions showing how to implement projection for functional lists. First version uses naive recursion and the second one is tail-recursive using the accumulator parameter. The third version extends this with continuation passing.

    73 people like this

    Posted: 14 years ago by Tomas Petricek

  • Hello world (F#)

    Classical "Hello world" example that prints a message to the console output. This version uses F# printfn function to do the printing.

    185 people like this

    Posted: 14 years ago by Tomas Petricek

Snippets by tags

seq (54) dsl (23) pattern matching (15) html (16) tutorial (17) http (18) monad (24) collections (16) quotations (21) lists (15) computation builder (17) async (98) agent (20) algorithms (26) wpf (20) math (35) f# (43) mailboxprocessor (27) lazy (20) reflection (19)

View all...

Database contains 3198 snippets out of which 1713 is public.