Displaying 1 to 20 from 52 results

actor-framework - An Open Source Implementation of the Actor Model in C++

  •    C++

CAF is an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more. The easiest way to build CAF is to use the configure script. Other available options are using CMake directly or SNocs.

Mach7 - Functional programming style pattern-matching library for C++

  •    C++

Pattern matching is an abstraction mechanism that can greatly simplify source code. Commonly, pattern matching is built into a language to provide better syntax, faster code, correctness guarantees and improved diagnostics. Mach7 is a library solution to pattern matching in C++ that maintains many of these features. All the patterns in Mach7 are user-definable, can be stored in variables, passed among functions, and allow the use of open class hierarchies. Next example demonstrates that the library can deal efficiently and in a type-safe manner with non-polymorphic classes like boost::variant as well.

match-when - :shell: Pattern matching for modern JavaScript

  •    Javascript

Note that when() is a catch-all pattern and, if used, should always be the last condition. If you forget it match() will throw a MissingCatchAllPattern exception if nothing was matched.

tiny-glob - 🚀 Super tiny and ~350% faster alternative to node-glob

  •    Javascript

Tiny and extremely fast library to match files and folders using glob patterns. "Globs" is the common name for a specific type of pattern used to match files and folders. It's the patterns you type when you do stuff like ls *.js in your shell or put src/* in a .gitignore file. When used to match filenames, it's sometimes called a "wildcard".




egison - Egison is a purely functional programming language with non-linear pattern-matching against non-free data types

  •    Haskell

Egison is the pattern-matching-oriented purely functional programming language. We can directly represent pattern-matching against lists, multisets, sets, trees, graphs and any kind of data types. This is the repository of the interpreter of Egison. For more information, visit our website.

pun - A small library to enable pattern matching in javascript and coffeescript

  •    Javascript

A tiny functional programming library for Javascript/Coffeescript.

defun - A macro to define clojure functions with parameter pattern matching just like erlang or elixir

  •    Clojure

A macro to define clojure functions with pattern matching just as erlang or elixir. It supports both clojure and clojurescript. Since 0.3.0-RC, defun namespace is renamed to defun.core .

earl-grey - Programming language compiling to JavaScript

  •    Javascript

Counting all words in a block of test. Note that count-words is a variable name, not a subtraction (it is equivalent to the name countWords, if that's the notation you prefer). The each operator accepts multiple clauses, which makes it especially easy to work on heterogenous arrays.


Functional Programming

  •    CSharp

This project brings some features from functional languages, like pattern matching, collection unfold or partial function application to C# and extends the possibilities of functional programming in C#. It's available as C# library.

bop - Bop is a very fast Boyer-Moore parser/matcher for String or Buffer patterns.

  •    Javascript

Bop, an ultra fast Boyer-Moore parser/matcher optimized for string and buffer patterns (<= 255 bytes), then it is ideal for parsing multipart/form-data streams, that have a pattern / boundary length < ~70 bytes.

cats.match - Pattern matching for the monads in the cats Clojure library

  •    Clojure

cats.match provides pattern matching for the monads in the clojure cats library.It uses the core.match library to do the pattern matching part.

siringa - Minimalist dependency injection library for Python that embraces annotations syntax

  •    Hy

siringa (meaning syringe in Italian) is a minimalist, idiomatic dependency injection and inversion of control library for Python, implemented in Hy, a homoiconic Lisp dialect for Python.To get started, take a look to the documentation, API, tutorial and examples.

funcy - An experiment in adding functional pattern matching to JavaScript

  •    Javascript

The above function implements a simple factorial function using pattern matching. When you call fact(10) the value ‘10’ is matched against the first pattern ‘0’. This match fails and the next pattern is evaluated. The ‘$’ in the next pattern is an example of a parameter. A parameter matches anything, so the match succeeds and ‘10’ is passed as an argument to the anonymous function. Since this is a recursive function it will match the second pattern until the argument to the function reaches zero and then terminates. Note that this example uses JavaScript ES6 syntax, code in previous JavaScript versions will be slightly more verbose. The fun method takes one or more pattern expressions and returns a function which, when called, will try to match the values passed to the patterns. If a match is found an anonymous function corresponding to the matched pattern is executed, and any extracted values passed to it as arguments.

p - Pattern matching in javascript for asynchronous iteration

  •    Javascript

Pattern matching in javascript for asynchronous iteration

expat - Reusable, composable patterns across Elixir libraries

  •    Elixir

Expat lets you split any pattern (be it for maps, lists, tuples, etc) into reusable bits, enabling you to combine them or export some patterns for reuse across Elixir libraries. If you are looking to validate Elixir data structures you might want to look at Spec. You can always first conform your data with Spec and then use Expat to pattern match the resulting conformed value and extract some value from it.

pattern-matching-with-typescript - TypeScript does not have any pattern matching functionality built in

  •    Javascript

TypeScript does not have any pattern matching functionality built in. This article shows several ways how you can replicate the core of a simple pattern matcher using a few simple structures and functions within TypeScript. Resulting code will have improved maintainability and better runtime type safety when done right.

matchete - A DSL for method overloading in Ruby based on pattern matching

  •    Ruby

Matchete provides a DSL for method overloading based on pattern matching for Ruby. Copyright (c) 2015 Alexander Ivanov. See LICENSE for further details.

match - Erlang-like pattern matching in JavaScript.

  •    Javascript

Erlang-like pattern matching in JavaScript (use at your own risk). Unlike the proposal-pattern-matching, patterns inside the function arguments are quite limited supported. However, it can be extended using when().

pattern-match - A pattern-matching DSL for JSON-like trees of data.

  •    Javascript

A pattern matching DSL for JavaScript. The module is a function that takes an arbitrary JavaScript value and tests it against a pattern. If the match succeeds, the result is a sub-match object, which consists of the sub-components of the value that matched named sub-patterns (using the var pattern). If the match fails, a MatchError is thrown. Provides the cases by calling when in the order the cases should be tried. The library calls body with the thisArg provided to match as the binding of this.

akar - First-class patterns for Clojure

  •    Clojure

Akar is a pattern matching library for Clojure, with focus on simplicity and abstraction. Akar patterns are first-class values (just functions, actually), that can be manipulated, composed, abstracted over, like any other values. In fact, this is exactly how various pattern operations, such as guards, alternation, and views are implemented in Akar.