A Uri parser using the Cashel library [1]. This implementation is using ArraySegment
Posted: 13 years ago by Ryan Riley
I made LazyBuilder. The synthesis of the lazy function is troublesome. When the call of the Force() method increases, it is ugly. This solves the problem.
11 people like thisPosted: 13 years ago by zecl
This is an implementation of the Continuation monad using a type, taking an exception handler, and allowing for Call/CC. This specific implementation is mostly Matt Podwysocki's. I have a similar implementation using a purely functional, exception-handler-less version in FSharp.Monad. Until now, I haven't been able to resolve the callCC operator.
4 people like thisPosted: 13 years ago by Ryan Riley
A Monad for composing computations with retry logic. (Useful when we work with Cloud Services)
6 people like thisPosted: 13 years ago by Nick Palladinos
I learned how to implement this by reading this great good project http://code.google.com/p/fsharp-typeclasses/ But I can't understand why the project needs ternary operator. I used binary operator and seems it's okay.
6 people like thisPosted: 12 years ago by nagat01
Retry monad: chaining functions together, retrying each one if exceptions are thrown, until the first time a function can no longer be retried
5 people like thisPosted: 12 years ago by Boris Kogan
A compositional type system built using generics and monads in F#. It is only a very limited, _toy_ project exploring traits, mixins and aspect-oriented programming.
17 people like thisPosted: 12 years ago by Zach Bray
A monadic trampoline for stack-overflow free programming.
6 people like thisPosted: 12 years ago by Nick Palladinos
After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.
1 people like thisPosted: 10 years ago by Robert Nielsen
This is a crazy solution to the flappy bird dojo by Phil Trelford. It defines a custom computation builder to eliminate all mutation of the flappy bird. The script uses WPF and is playable on Windows in F# interactive, just copy the raw version, and for cross-platform implementations download: http://trelford.com/prognet15.zip
3 people like thisPosted: 9 years ago by Tomas Petricek
An exploration of the power of Computation Expressions, Type Extensions, Extension Methods, and Method Overloading. May or may not be a monad or a monoid - we're not sure, nor do we care to check.
7 people like thisPosted: 6 years ago by Tomas Petricek, Krzysztof Cieślak, John Azariah, Phillip Carter
This snippet provides a builder for scope {...} computational workflow that returns a Scope object implementing System.IDisposable interface. All "use" bindings inside scope {...} workflow are kept from being disposed immediately when computation leaves scope. Instead, they are disposed only when resulting Scope object is disposed. This makes possible to access disposable outside the scope while it remains usable. This can be achieved by via return statement of workflow that can return, for example, a closure that encapsulates disposable. scope {...} return value is available through Value property of Scope object. Scopes may be nested through let! binding that means that nested scope will be disposed when the resulting scope is disposed.
3 people like thisPosted: 2 years ago by Crazy Monk
Computation builder that provides easy way of constructing IDisposable objects. It supports elegant composition of disposable objects using 'do!' which can be used for example when working with 'IObservable' type.
42 people like thisPosted: 13 years ago by Tomas Petricek
Haskell-style IO in F#.
16 people like thisPosted: 13 years ago by igeta
Oleg's delimited continuation monad [1] and creating an external iterator from an internal iterator using it. [1] http://okmij.org/ftp/continuations/implementations.html#genuine-shift
6 people like thisPosted: 13 years ago by einblicker
Computation builder for writing non-deterministic computations.
8 people like thisPosted: 13 years ago by Tomas Petricek
Polymorphic (via generics) Maybe monad/computational expression with default value + Zipper
6 people like thisPosted: 12 years ago by Daniil
Simple Computational expressions / monad / builder -example, using .NET Nullable as demo.
3 people like thisPosted: 12 years ago by Tuomas Hietanen
The generic model for stateful computation (S -> S x R) provides a convenient mechanism of threading stateful computation results since the functor λR . S -> S x R is monadic. But what happens if we want to thread state itself? Well, the mapping λS. S -> S x R is not even functorial! But it turns out it can become so with a bit of trickery. This snippet demonstrates a way to lift, project or inject stateful computations into ambient state monads.
8 people like thisPosted: 12 years ago by Eirik Tsarpalis
After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.
3 people like thisPosted: 10 years ago by Robert Nielsen
After watching this clip (http://www.youtube.com/watch?v=ZhuHCtR3xq8) on Youtube featuring Brian Beckman I wanted to try to sketch Brian's main argument that Monads' main purpose is function composition. I will post my sketch to http://rodhern.wordpress.com/2014/02/ . These snippets are the companion examples to the blog post.
1 people like thisPosted: 10 years ago by Robert Nielsen
A colleague recently mentioned the problem of not having MonadFix in a strict language. Here is my 2 hour potential approach to implementing it in ML. Let me know if I got something totally wrong!
3 people like thisPosted: 9 years ago by Vesa Karvonen
Basic implementation of the continuation monad with explanation.
9 people like thisPosted: 4 years ago by Brian Berns
Interactive computation that asks the user questions
9 people like thisPosted: 5 months ago by Tomas Petricek