Git Product home page Git Product logo

core.match's People

Contributors

amalloy avatar daveray avatar frenchy64 avatar miner avatar swannodette avatar

Stargazers

 avatar

Watchers

 avatar  avatar

core.match's Issues

Create patterns such that zero or more items can be matched.

Currently, core.match allows for matching on one or more items thanks to Lisp-style sequence destructuring. For example, consider the following match clause:

[([a & b] :seq)] rhs

This will match a sequence of one or more items, with the first bound to a and the rest bound to a sequence identified by b.

This is pretty nice, but it falls short of the niceness we get in IU Scheme Match. Specifically, consider the following match clause in IU Scheme:

[(a* ...) rhs]

This will return a list matching all the elements if matching on a list (though this is pretty silly in practice). Note that this will match on the empty list, but there's no way express the same thing in clojure.core.match.

I'd be interested to see if this is possible, even if added with a more Scheme-like syntax.

Add catamorphism

Again, Clojure's core.match, while quite nice, lacks some of the trimmings of IU Scheme Match. Of note is the catamorphism syntax, or at least the simple version. In IU Match, this allows for recurring to the same instance of match with the variable(s) that matched the given pattern.

The official core.match repo claims that predicate dispatch is on their road map. This might map onto catamorphism syntax, so I'll have to stay apprised of that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.