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.
2 people like thisPosted: 1 month ago by Tomas Petricek
Uses StringBuilder to achieve performance.
2 people like thisPosted: 1 month ago by shazmodan
Pseudoword generator based on code from Evan Fosmark circa 2009.
0 people like thisPosted: 1 month ago by Phillip Trelford
Interactive computation that asks the user questions
9 people like thisPosted: 5 months ago by Tomas Petricek
Making QR-code image having contact information (VCard) with Google Chart API. If you scan this image with mobile phone, you can directly add new person to your contacts.
7 people like thisPosted: 5 months ago by Tuomas Hietanen
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.
4 people like thisPosted: 6 months ago by Tomas Petricek
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 thisPosted: 13 years ago by Tomas Petricek
This is to demonstrate that: (1) there are many ways to solve the same problems; (2) operators can be grouped together into data structures and act as data; (3) you can have fun in F# in many ways.
57 people like thisPosted: 13 years ago by Dmitry Soshnikov
Composition of functions in F# is easily achieved by using the >> operator. You can also chain an arbitary amount of functions (represented as a list or sequence) together by folding the list/seq with >>. [More formally: the set of endomorphisms 'a -> 'a forms a monoid with the binary, associative operator ">>" (or "<<") and the neutral element "id".]
86 people like thisPosted: 13 years ago by Novox
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.
83 people like thisPosted: 13 years ago by Dmitri Pavlenkov
This function is given a partition predicate and a sequence. Until the predicate returns false, a list will be filled with elements. When it is, both the list and the remainder of the sequence will be returned. Note that this example preserves the laziness of the unchecked sequence elements.
69 people like thisPosted: 13 years ago by Rick Minerich
I'm working on parallel computations and I thought it would be useful to break work into chunks, especially when processing each element asynchronously is too expensive. The neat thing is that this function is general even though motivation for it is specific. Another neat thing is that this is true lazy sequence unlike what you'd get if you used Seq.groupBy. There are three versions for your enjoyment.
73 people like thisPosted: 13 years ago by Dmitri Pavlenkov
string (28) f# (43) monad (24) mailboxprocessor (27) lists (15) computation builder (17) computation expression (15) seq (54) recursion (33) math (35) web (29) async (98) staging (18) reflection (19) regex (17) quotations (21) dsl (23) html (16) game (32) collections (16)
Kit Eason (51) Antonio Cisternino (8) Rick Minerich (15) Robert Pickering (10) Samuel Bosch (12) Cesar Mendoza (17) Gauthier Segay (11) Nick Palladinos (66) Tuomas Hietanen (75) Phillip Trelford (87) Fabio Galuppo (14) Taha Hachana (12) David Klein (16) devshorts (11) Evgeniy Andreev (13) Ryan Riley (25) Brian Berns (9) NIck Palladinos (14) Faisal Waris (37) Eirik Tsarpalis (89)
Database contains 3197 snippets out of which 1712 is public.