Snippets created by Novox

  • Composing a list of functions

    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".]

    83 people like this

    Posted: 13 years ago by Novox

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

    22 people like this

    Posted: 4 years ago by Novox