F# Snippets
Recently added snippets
Minimal Twitter search function
A simple Twitter search function, leveraging the JSON type provider.
Posted: 3 days ago by Lincoln Atkinson
Draw from sequences
Peeks from a few seq randomly according to specified frequencies. not tested
Posted: 5 days ago by nicolas2
backup files
backup files , construct directory structure and then copy them one by one, ignore some sub directory in ignore list
Posted: 5 days ago by rigid wang
Count leading zeros
Several ways of counting leading zeros in a binary number.
Posted: 13 days ago by Bjørn Bæverfjord
Reducers
A simple yet powerful library for parallel collection processing. Inspired by Clojure's Reducers.
Posted: 15 days ago by Nick Palladinos
Type inference test
Trying to understand why some type inference used to work in OCaml and not anymore in F#
Posted: 15 days ago by Lasher`
Popular snippets
Continuation-Passing Mnemonics
Continuations provide a means whereby heap space can be traded for stack depth (heap space being generally more plentiful than stack depth). They are especially useful where tail recursion is not possible. Here are a couple of simple continuation examples that can be extended to cover more complex scenarios.
72 people like this
Posted: 2 years ago by Neil CarrierPipeline list processing
An example showing how to process list in a pipeline. We first use List.filter to return only even numbers and then use List.map to format them as strings.
80 people like this
Posted: 2 years ago by Tomas PetricekRead only ref
F# implementation of RO_ref from the "Effective ML" talk.
78 people like this
Posted: 2 years ago by fholm
Adapter pattern
Invoke the methods from incompatible types
88 people like this
Posted: 1 years ago by Tao LiuHaskell 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.
135 people like this
Posted: 2 years ago by Nick PalladinosStrategy pattern
Strategy pattern in F#
68 people like this
Posted: 1 years ago by Tao Liu
Snippets by tags
View all..Snippets by authors
View all..Database contains 1109 snippets out of which 838 are public.