Recent snippets

  • Truth Table Generator

    This program is a mess, really - just ignore support functions. It'll be great if you can help me tidy up. Here's the passcode: "Passcode". The version of code below may not be original.

    0 people like this

    Posted: 3 hours ago by you

  • Exception-free String.Insert

    "Please enter the description" - Why'd I do that ?

    0 people like this

    Posted: 3 hours ago by you

  • Shuffled Array

    String.Join (" ", [| "This" ; "is"; "a" ; "way" ; "to" ; "generate" ; "a" ; "shuffled" ; "array" ; "with" ; "given" ; "elements" ; "from" ; "an" ; "(ordered)" ; "array." |]) |> printf "\n >> %A\n"

    0 people like this

    Posted: 3 hours ago by you

  • Simple C# Parser

    Simple prototype C# AST and parser using the FParsec parser combinator library. Parses a subset of C# 1.1 constructs.

    2 people like this

    Posted: 3 days ago by Phillip Trelford

  • Exponentiation by squaring

    Function, what calculates x^n by non-recursive basic exponentiation squaring algorithm. This method uses the bits of the exponent to determine computing powers. Generic parameter x suitable for any type what supports multiplication. I do not suppose existence of inverse operator like "/", thus parameter n must be a positive integer only. It is not difficult to define an extended variant for a type what supports division.

    3 people like this

    Posted: 17 days ago by Pavel Tatarintsev

  • Get Bitcoin wallet

    Get Bitcoin wallet account balance by public 1Attj6CfQgnbrkmyeahbFEfjK2T3BRtyzJ

    0 people like this

    Posted: 1 month ago by The streets

Popular snippets

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

    65 people like this

    Posted: 9 years ago by Tomas Petricek

  • Split a list

    Three ways to split a list in half (but not necessarily in the middle). A forth version added that's very short and should be fast, as we only use List.fold. New champ found.

    78 people like this

    Posted: 9 years ago by Dmitri Pavlenkov

  • Creating objects with events

    This snippet shows how to create objects with events in F#. It shows both simple event (to be used from F#) and a .NET compatible event with specific delegate type.

    78 people like this

    Posted: 9 years ago by Tomas Petricek

Snippets by tags

fparsec (15) array (22) parsing (25) web (26) sequence (31) tryfsharp (48) string (24) wpf (20) monad (22) f# (44) tutorial (17) lists (14) reflection (18) pattern matching (14) list (53) staging (18) agent (20) dsl (23) silverlight (22) quotations (19)

View all...

Database contains 2389 snippets out of which 1622 is public.