Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

MATCH-86: Cannot AOT OrPatterns

pseudo-pattern detection happened via multimethods. While I could not
determine why multimethods present a problem here - it was simpler to
change pseudo-pattern detection to checking for the presence of a marker
interface.
latest commit 23adaf466f
David Nolen swannodette authored April 21, 2014
Octocat-spinner-32 script port `match-let`, `matchv` to ClojureScript support June 21, 2013
Octocat-spinner-32 src MATCH-86: Cannot AOT OrPatterns April 21, 2014
Octocat-spinner-32 .gitignore * .gitignore: add ignores October 04, 2011
Octocat-spinner-32 CHANGES.md update CHANGES.md to reflect 0.2.1 changes February 20, 2014
Octocat-spinner-32 README.md 0.2.1 January 14, 2014
Octocat-spinner-32 license.txt * license.txt: added license, updated readme April 12, 2011
Octocat-spinner-32 notes.txt * notes.txt: remove stale comments June 04, 2011
Octocat-spinner-32 pom.xml [maven-release-plugin] prepare for next development iteration January 14, 2014
Octocat-spinner-32 project.clj tweak project.clj March 28, 2014
README.md

match

An optimized pattern match and predicate dispatch library for Clojure. Currently the library only implements pattern matching. It supports Clojure 1.3.0 and later as well as ClojureScript.

You can find more detailed information here.

Releases and dependency information

Latest beta: 0.2.1

Leiningen dependency information:

[org.clojure/core.match "0.2.1"]

Maven dependency information:

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>core.match</artifactId>
  <version>0.2.1</version>
</dependency>

Example Usage

From Clojure:

(use '[clojure.core.match :only (match)])

(doseq [n (range 1 101)]
  (println
    (match [(mod n 3) (mod n 5)]
      [0 0] "FizzBuzz"
      [0 _] "Fizz"
      [_ 0] "Buzz"
      :else n)))

From ClojureScript:

(ns foo.bar
  (:require-macros [cljs.core.match.macros :refer [match]])
  (:require [cljs.core.match]))

(doseq [n (range 1 101)]
  (println
    (match [(mod n 3) (mod n 5)]
      [0 0] "FizzBuzz"
      [0 _] "Fizz"
      [_ 0] "Buzz"
      :else n)))

For more detailed descriptions of usage please refer to the wiki.

Developer information

Copyright and license

Copyright © 2010-2013 David Nolen, Rich Hickey & contributors.

Licensed under the EPL (see the file epl.html).

Something went wrong with that request. Please try again.