Recent snippets

Popular snippets

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

    74 people like this

    Posted: 5 years ago by Dmitri Pavlenkov

  • Project Euler #1

    This snippet is code that solves first Project Euler problem. It finds the sum of all the multiples of 3 or 5 below 1000. Please add other (more efficient, succinct or interesting) solutions to this snippet.

    71 people like this

    Posted: 5 years ago by Eugene Gavrin

  • 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: 5 years ago by Alex Muscar

Snippets by tags

reflection (14) quotations (13) sequences (23) Game (16) MailboxProcessor (15) tutorial (16) agent (17) Seq (15) Sequence (10) Ninety-Nine F# Problems (11) sequence (19) game (14) math (28) lists (10) array (14) Algorithms (18) factorial (9) computation builder (13) fold (16) async (73)

View all...

Database contains 1914 snippets out of which 1371 is public.