GithubHelp home page GithubHelp logo

Comments (7)

dwhjames avatar dwhjames commented on September 26, 2024

Hmm, maybe I take this back… the parser accepts parens for rule invocation, but it looks like the convention of using parens is only at invokation and not at declaration.

from datomisca.

mandubian avatar mandubian commented on September 26, 2024

yes that's what I understand from my really poor knowledge of Clojure!

from datomisca.

dwhjames avatar dwhjames commented on September 26, 2024

For rule invocations within rule declarations,

[
  [[rule ?a ?c]
    [?a :ns/attr ?b]
    (rule ?b c)]
]

is required.

Maybe there’s a easy change to the parser combinators to allow either parens or brackets for rules.

from datomisca.

mandubian avatar mandubian commented on September 26, 2024

I'll look at it!

On Fri, Feb 22, 2013 at 4:13 PM, Daniel James [email protected]:

For rule invocations within rule declarations,

[
[[rule ?a ?c]
[?a :ns/attr ?b](rule ?b c)]]

is required.

Maybe there’s a easy change to the parser combinators to allow either
parens or brackets for rules.


Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-13947712.

from datomisca.

mandubian avatar mandubian commented on September 26, 2024

Daniel can you look at the test I added because it seems to work already...

from datomisca.

dwhjames avatar dwhjames commented on September 26, 2024

You’ve tested rules of the sort:

[[[rule ?a ?c]
    [?a :ns/attr ?b]
    (rule ?b c)]]

but I don’t think it accepts

[[(rule ?a ?c)
    [?a :ns/attr ?b]
    (rule ?b c)]]

I can’t find anything concrete, but it seems most people write the former, but I don’t think the latter is wrong, and nor is:

[[[rule ?a ?c]
    [?a :ns/attr ?b]
    [rule ?b c]]]

So the first is accepted, are there tests for the second two?

from datomisca.

mandubian avatar mandubian commented on September 26, 2024

Ok I see now what you mean!
I'm going to correct this ;)

from datomisca.

Related Issues (20)

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.