All Projects → missingfaktor → Akar

missingfaktor / Akar

Licence: apache-2.0
First-class patterns for Clojure. Made with love, functions, and just the right amount of syntax.

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to Akar

Whyhaskellmatters
In this article I try to explain why Haskell keeps being such an important language by presenting some of its most important and distinguishing features and detailing them with working code examples. The presentation aims to be self-contained and does not require any previous knowledge of the language.
Stars: ✭ 418 (+137.5%)
Mutual labels:  pattern-matching, functional-programming
Poica
🧮 A research programming language on top of C macros
Stars: ✭ 231 (+31.25%)
Mutual labels:  pattern-matching, functional-programming
Qo
Qo - Query Object - Pattern matching and fluent querying in Ruby
Stars: ✭ 351 (+99.43%)
Mutual labels:  pattern-matching, functional-programming
Pampy.js
Pampy.js: Pattern Matching for JavaScript
Stars: ✭ 544 (+209.09%)
Mutual labels:  pattern-matching, functional-programming
Egison
The Egison Programming Language
Stars: ✭ 800 (+354.55%)
Mutual labels:  pattern-matching, functional-programming
Fpgo
Monad, Functional Programming features for Golang
Stars: ✭ 165 (-6.25%)
Mutual labels:  pattern-matching, functional-programming
Pattern Matching Ts
⚡ Pattern Matching in Typescript
Stars: ✭ 107 (-39.2%)
Mutual labels:  pattern-matching, functional-programming
Z
Pattern Matching for Javascript
Stars: ✭ 1,693 (+861.93%)
Mutual labels:  pattern-matching, functional-programming
Metalang99
A functional language for C99 preprocessor metaprogramming
Stars: ✭ 152 (-13.64%)
Mutual labels:  functional-programming
Libf
C++ as a Pure Functional Programming Language
Stars: ✭ 167 (-5.11%)
Mutual labels:  functional-programming
Dslsofmath
Domain Specific Languages of Mathematics
Stars: ✭ 159 (-9.66%)
Mutual labels:  functional-programming
Kotlin Retry
A higher-order function for retrying operations that may fail.
Stars: ✭ 159 (-9.66%)
Mutual labels:  functional-programming
Scala Server Toolkit
Functional programming toolkit for building server applications in Scala.
Stars: ✭ 170 (-3.41%)
Mutual labels:  functional-programming
Egison Ruby
A Ruby gem for non-linear pattern-matching with backtracking
Stars: ✭ 159 (-9.66%)
Mutual labels:  pattern-matching
Symja android library
☕️ Symja - computer algebra language & symbolic math library. A collection of popular algorithms implemented in pure Java.
Stars: ✭ 170 (-3.41%)
Mutual labels:  pattern-matching
Category Theory For Dotnet Programmers
This repo contains all c++ / haskell samples from Bartosz Milewski's book (Category Theory for Programmers) converted to csharp and fsharp
Stars: ✭ 159 (-9.66%)
Mutual labels:  functional-programming
Kotlindiscretemathtoolkit
Set of extensions for Kotlin that provides Discrete math functionalities
Stars: ✭ 158 (-10.23%)
Mutual labels:  functional-programming
Iota
Fast [co]product types with a clean syntax. For Cats & Scalaz.
Stars: ✭ 175 (-0.57%)
Mutual labels:  functional-programming
Curryable
An elegant and simple curry(f) implementation in PHP.
Stars: ✭ 172 (-2.27%)
Mutual labels:  functional-programming
Deal
Design by contract for Python with static checker and tests' generation.
Stars: ✭ 164 (-6.82%)
Mutual labels:  functional-programming

Akar

Join the chat at https://gitter.im/missingfaktor/akar Build Status

Clojars Project Clojars Project

[Speech]
Queen: Hmm...

Who's been painting my roses red?
Who's been painting my roses red?

Who dares to taint with vulgar paint
the royal flower bed?

For painting my roses red
someone will lose his head.

[Spoken]
Three: Oh no, your majesty, please, it's all his fault!
Two: Not me, Your Grace. The Ace! The Ace!
Queen: You?
Ace: No, Two!
Queen: The Deuce, you say?
Two: Not me, the Tres!
Queen: That's enough! Off with their heads!

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.

The library also features a syntactic layer that makes common use cases convenient, but at the same time stays true to the first-class spirit of the core model.

Akar (IPA: [ɑkɑɾ], Devanagari: आकार) is a Sanskrit/Marathi word for shape. The logo is a Saraswati Kolam, a diagrammatic representation of Hindu goddess of wisdom.

To learn more, read the Akar tutorial and FAQs.

Releases and Dependency Information

# Specific Akar projects
[akar/akar-core "1.0.0"]

# All Akar projects
[akar "1.0.0"]

Example

(ns your.app
  (:require [akar.syntax :refer [match]]
            [clojure.data.xml :as xml]))

; Example borrowed from https://wiki.scala-lang.org/display/SYGN/Xml-pattern-matching
(defn italics [xml-node]
  (match xml-node
         {:tag :i :content (:seq [contents])} (println contents)
         {:tag :node :content nodes}          (doseq [child nodes] (italics child))
         :_                                   nil))

(def xml-doc
  (xml/parse (java.io.StringReader.
               "<node>
                  <node>This is <i>some</i> text content.
                    <node>This is <i>deeper</i> stuff.</node>
                  </node>
                  <node>I am some text.
                    <title>I am <i>a title</i>.</title>
                    This is a sentence with an <i>italicized</i> entry.
                  </node>
                </node>")))

(italics xml-doc)

; prints:
;   some
;   deeper
;   italicized

Contributing

Do you wish to contribute to Akar? Splendid! Get started here.

License

Copyright © 2018 Rahul Goma Phulore, Rahul Kavale

Distributed under Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].