Functional style Regex engine
21 people like thisPosted: 9 years ago by Nick Palladinos
We start with an initial value and then applying f repeatedly, until the value does not change anymore.
293 people like thisPosted: 9 years ago by Nick Palladinos
A LazyList implementation with tail recursive enumeration.
39 people like thisPosted: 9 years ago by Nick Palladinos
Haskell-inspired infinite sequences
47 people like thisPosted: 9 years ago by Nick Palladinos
A Clojure inspired (race free) memoize function, that uses a mutable atom cell.
21 people like thisPosted: 9 years ago by Nick Palladinos
x = f(x) encoded in F#
22 people like thisPosted: 9 years ago by Nick Palladinos
Yet another attempt of mine to "haskellify" my F# coding.
10 people like thisPosted: 9 years ago by Nick Palladinos
The repmin problem is to replace all elements of a tree of numbers by the minimum element, making only a single pass over the original tree. Repmin is a very ingenious example of Circular Programming.
3 people like thisPosted: 8 years ago by Nick Palladinos
A FuncList is a "list-like" datatype with constant time append (represented as a function of cons-lists). The implementation is based on a convenient computation builder.
1 people like thisPosted: 8 years ago by Nick Palladinos
A combinator based DSL for composing type-safe parameterized sql queries. Inspired by Olivier Danvy's "Functional Unparsing" paper.
10 people like thisPosted: 8 years ago by Nick Palladinos
An old solution of mine to Erik Lippert's Comma Quibbling challenge. I really like this snippet because it shows that with F# we can hack elegant but also fast code.
3 people like thisPosted: 8 years ago by Nick Palladinos
Scrap Your Boilerplate with the help of F#. Based on the original paper by Ralf Laemmel and Simon Peyton Jones.
9 people like thisPosted: 8 years ago by Nick Palladinos
Polyvariadic fixpoint combinator in F# (heavily inspired by Haskell)
3 people like thisPosted: 8 years ago by Nick Palladinos
A pattern for creating n-ary Seq.map functions, based on numerals.
4 people like thisPosted: 8 years ago by Nick Palladinos
A simple and declarative solution based on Joinads.
5 people like thisPosted: 8 years ago by Nick Palladinos
A typecast free experiment in Generic Programming. Inspired by "Scrap Your Boilerplate (with class)".
8 people like thisPosted: 7 years ago by Nick Palladinos
An experiment on type-level computations.
4 people like thisPosted: 7 years ago by Nick Palladinos
A monadic trampoline for stack-overflow free programming.
5 people like thisPosted: 7 years ago by Nick Palladinos
Church numerals via rank-2 polymorphism
4 people like thisPosted: 7 years ago by Nick Palladinos
Fast and GC friendly fixpoint combinator.
9 people like thisPosted: 7 years ago by Nick Palladinos
C++ style metaprogramming in F#
4 people like thisPosted: 6 years ago by Nick Palladinos
An implementation of session types in F#. Inspired from the paper "Haskell Session Types with (Almost) No Class"
6 people like thisPosted: 6 years ago by Nick Palladinos
Algebraic effects and handlers is a new modular approach for handling effectful computations in functional languages. Inspired from the paper "Handlers in action"
4 people like thisPosted: 6 years ago by Nick Palladinos
Normalisation of "F# quotations" by evaluation.
4 people like thisPosted: 5 years ago by Nick Palladinos
Staged Fixed-point combinator.
4 people like thisPosted: 4 years ago by Nick Palladinos
Staged fixed-point combinator without staged recursion.
3 people like thisPosted: 4 years ago by Nick Palladinos
Generic Type-level Fold for Boolean Algebra
0 people like thisPosted: 4 years ago by Nick Palladinos
Generic Numeric Literals and Compile time Peano arithmetic
1 people like thisPosted: 3 years ago by Nick Palladinos
Staged CPS Regular Expression Matcher based on CPS RegEx matcher in http://dl.acm.org/citation.cfm?id=968582
4 people like thisPosted: 3 years ago by Nick Palladinos
Staged Parser Combinators
2 people like thisPosted: 3 years ago by Nick Palladinos
Staged Monoidal Folds based on https://github.com/Gabriel439/slides/blob/master/munihac/foldmap.md
1 people like thisPosted: 3 years ago by Nick Palladinos
Lightweight Staged Numeric code.
1 people like thisPosted: 3 years ago by Nick Palladinos
Staged Higher-order abstract syntax via GADT encoding.
4 people like thisPosted: 2 years ago by Nick Palladinos
From Löb's Theorem to Spreadsheet Evaluation, based on http://blog.sigfpe.com/2006/11/from-l-theorem-to-spreadsheet.html.
0 people like thisPosted: 2 years ago by NIck Palladinos
Staged Ziria Streams, based on https://github.com/dimitriv/ziria-sem/blob/master/Haskell/ZirBasic.hs.
0 people like thisPosted: 2 years ago by NIck Palladinos
Staged Parallel Ziria Streams.
1 people like thisPosted: 2 years ago by NIck Palladinos
Staged Trampoline.
1 people like thisPosted: 2 years ago by NIck Palladinos
Countdown problem via Z3.
2 people like thisPosted: 2 years ago by NIck Palladinos
Discovering Life patterns via Z3.
2 people like thisPosted: 2 years ago by NIck Palladinos
The Eff monad in F#, based on http://okmij.org/ftp/Computation/free-monad.html.
2 people like thisPosted: 2 years ago by NIck Palladinos
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.
203 people like thisPosted: 9 years ago by Nick Palladinos
Clojure's Atoms are ref like structures, with the addition of (Compare And Swap) update semantics
30 people like thisPosted: 9 years ago by Nick Palladinos
Clojure's Atoms are ref like structures, with the addition of (Compare And Swap) update semantics
28 people like thisPosted: 9 years ago by Nick Palladinos
A simple Quine in F#
23 people like thisPosted: 9 years ago by Nick Palladinos
A higher kind of request to Don Syme... please please please,,,, we desperately need higher kinds!
15 people like thisPosted: 9 years ago by Nick Palladinos
Modular memoization within a pure functional setting that is implemented as a convenient computation builder.
89 people like thisPosted: 9 years ago by Nick Palladinos
The Untyped Lambda Calculus encoded as actors (F#'s MailboxProcessors)
2 people like thisPosted: 8 years ago by Nick Palladinos
Regex match via Active Patterns with Type based value extraction.
5 people like thisPosted: 8 years ago by Nick Palladinos
A CPS version of FuncList, in order to avoid blowing the stack.
3 people like thisPosted: 8 years ago by Nick Palladinos
A line-by-line translation of Norvig's original Python code. An attempt to view F# as a "typed" Python.
6 people like thisPosted: 8 years ago by Nick Palladinos
Async is a very versatile structure, which has been used to compose CPU/IO bound computations. So it is very tempting to implement a MapReduce function based on Async and borrowing ideas from the theory of list homomorphisms.
7 people like thisPosted: 8 years ago by Nick Palladinos
A Monad for composing computations with retry logic. (Useful when we work with Cloud Services)
6 people like thisPosted: 8 years ago by Nick Palladinos
A pattern for creating n-ary Seq.map functions.
4 people like thisPosted: 8 years ago by Nick Palladinos
A pattern for programming with generic folds (catamorphisms). Based on the classic "Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire" (1991) (Meijer, Fokkinga, Paterson).
8 people like thisPosted: 8 years ago by Nick Palladinos
A Lazy Xml structure for processing large xml documents.
10 people like thisPosted: 8 years ago by Nick Palladinos
Encoding mutually-recursive functions with a Polyvariadic fixpoint combinator.
5 people like thisPosted: 7 years ago by Nick Palladinos
A minimal interpreter for David Madore's crazy-esoteric programming language.
5 people like thisPosted: 7 years ago by Nick Palladinos
A simple extension method for asynchronous non-deterministic computations.
4 people like thisPosted: 7 years ago by Nick Palladinos
Type Safe Higher-order abstract syntax via GADT encoding
4 people like thisPosted: 7 years ago by Nick Palladinos
A crazy experiment for "Scalable" collections. Inspired by the paper "Fighting Bit Rot with Types"
5 people like thisPosted: 7 years ago by Nick Palladinos
A simple yet powerful library for parallel collection processing. Inspired by Clojure's Reducers.
10 people like thisPosted: 6 years ago by Nick Palladinos
Delimited continuations encoded as a parameterized continuation monad.
1 people like thisPosted: 6 years ago by Nick Palladinos
A type-level SAT solver in F#, inspired by https://gist.github.com/wouter-swierstra/0b6062c9660e751cd535
5 people like thisPosted: 5 years ago by Nick Palladinos
Examples of Infinite Streams defined using a lazy fixed-point combinator.
4 people like thisPosted: 4 years ago by Nick Palladinos
Application of staging to "scrap your boilerplate" generic programming technique.
2 people like thisPosted: 4 years ago by Nick Palladinos
Partial evaluating the Ackermann function.
1 people like thisPosted: 4 years ago by Nick Palladinos
A staged a regular expression interpreter is a compiler!!!
4 people like thisPosted: 4 years ago by Nick Palladinos
Fusion via reducer partial application, based on http://manojo.github.io/resources/staged-fold-fusion.pdf
3 people like thisPosted: 3 years ago by Nick Palladinos
Quotations to A-Normal form based on http://matt.might.net/articles/a-normalization/
0 people like thisPosted: 3 years ago by Nick Palladinos
Staged Functional Unparsing based on http://www.brics.dk/RS/98/12/BRICS-RS-98-12.pdf
0 people like thisPosted: 3 years ago by Nick Palladinos
Weak Equality type, useful for various GADT encodings.
2 people like thisPosted: 3 years ago by Nick Palladinos
Staged Higher-order abstract syntax via GADT encoding.
0 people like thisPosted: 2 years ago by Nick Palladinos
Transform a Free Monad interpreter to a compiler through staging.
2 people like thisPosted: 2 years ago by Nick Palladinos
From Löb's Theorem to Spreadsheet Evaluation (memoized), based on http://blog.sigfpe.com/2006/11/from-l-theorem-to-spreadsheet.html
2 people like thisPosted: 2 years ago by NIck Palladinos
Staged typed formatting, based on http://okmij.org/ftp/ML/GADT.txt, https://www.cl.cam.ac.uk/~jdy22/papers/modular-macros.pdf
0 people like thisPosted: 2 years ago by NIck Palladinos
yin-yang puzzle, based on https://groups.google.com/forum/#!msg/comp.lang.scheme/Fysq_Wplxsw/awxEZ_uxW20J
0 people like thisPosted: 2 years ago by NIck Palladinos
Counting Evens and Odds via Z3.
1 people like thisPosted: 2 years ago by NIck Palladinos
Eternity 2 Solver via Z3.
2 people like thisPosted: 2 years ago by NIck Palladinos
Discovering multistep Life patterns via Z3.
1 people like thisPosted: 2 years ago by NIck Palladinos
The Eff Monad via delimited continuations, based on http://kcsrk.info/papers/eff_ocaml_ml16.pdf.
2 people like thisPosted: 2 years ago by NIck Palladinos