quark v1.0.0 Release Notes

Release Date: 2016-01-02 // over 8 years ago
  • ๐Ÿš€ ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰ Happy New Year and a happy first Quark release! ๐ŸŽ‰ ๐ŸŽ‰ ๐ŸŽ‰

    Quark 1.0.0 has arrived! Having recently undergone mitosis from Witchcraft, we've fleshed out quite a few functional programming basics that we felt would be useful in Elixir.

    Functional Overview

    SKI combinators

    Yes, now you too can define all of your algorithms in incomprehensible strings of s and k! Get your s k (k k) on! But seriously, a lot of this stuff is pretty useful. We've provided friendlier names at the top-level Quark module, so that you can write const, rather than having remember what k does.

    BCKW combinators

    The classic b, c, k, and w combinators of lore. Pretty much the same idea as with SKI, but some different functionality. And as usual, we've aliased the names at the top-level.

    ๐Ÿ›  Fixed Point

    ๐Ÿ›  Fixed point combinators, for helping with recursion. Several formulations are provided, but stick to fix (should be the most efficient at any given time, and thus somewhat more future-proof).

    Compose

    Compose functions to do convenient partial applications. Versions for composing left-to-right and right-to-left are provided, but the operator <|> is done "the math way" (right-to-left). Versions on lists also available.

    Sequence

    Really here for pred and succ on integers, by why stop there? This works with any ordered collection.

    Curry

    Functions

    curry creates a 0-arity function that curries an existing function. uncurry applies arguments to curried functions, or if passed a function creates a function on pairs.

    Macros

    Why define the function before currying it? defcurry and defcurryp return fully-curried 0-arity functions.

    Partial

    ๐Ÿฑ ๐Ÿ‘‘ We think that this is really the crowning jewel of Quark. defpartial and defpartialp create all arities possible for the defined function, bare, partially applied, and fully curried. This does use up all the full arity-space for that function name, however.

    Closing Remarks

    We hope that you enjoy Quark! Please let us know if you have new feature requests.

    With humanity,

    ~ Robot Overlord Inc.