Clause (js)


( API docs and the index table are auto-generated with spec-docgen.
To contribute to API notes & examples, make a pull request to annotation source files here.)

Introduction

Refer to README file for basic intro.

What is Conformation?

To put it plainly, as a developer you expect your data to be of certain "shape".

You define the shape of the data with clauses.

To "conform" your data with your clauses is to shape it in a way that is better organized, making it easier for your code to consume.

[TODO: more write-up]

Regex-like Operations on Iterables

Both array and string are treated as iterables in Clause, which means both types can be the subject of regex-like operations.

For example, both of the following clause definitions are valid:

Array

var ArrayClause = C.cat('foos', C.oneOrMore(C.equal('foo')),
                        'bars', C.oneOrMore(C.equal('bar')));

C.conform(ArrayClause, ['foo', 'foo', 'foo', 'bar', 'bar']);

String

var StrClause = C.cat('foos', C.oneOrMore(C.sCat('foo')),
                      'bars', C.oneOrMore(C.sCat('bar')));

C.conform(StrClause, 'foofoofoobarbar');

Notice that in the first clause, we use C.equals() to treat the string as a single entity, whereas in the second, we use C.sCat() to indicate that each character in the string is part of the collection that we run regex ops on.

API

Work in progress.

Below is a set of auto-generated API reference by clausejs-docgen based on clause declarations and their corrosponding annotations.

C
  function
Convenient method that combines C.get() and C.set() into one function to get or set clauses from the global registry.
Syntax
Examples
C("awesomeapp/TodoItem", TodoItemClause)
var ref = C("awesomeapp/TodoItem");
ref.get()
Clause Description
fclause( {
  <args>: or(
    "register", cat(
      "nsPath", NamespacePath, 
      "expression", Expression
    ), 
    "retrieve", cat( "nsPath", NamespacePath )
  ), 
  <ret>: or(
    Undefined, 
    ClauseReference
  )
} )
Argument Clause Graph
[or] either one of

Should be one of the following:

Option 1 “register”
Put the given expression onto the given path in the global clause registry.
Examples:
C("awesomeapp/TodoItem", TodoItemClause)
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “nsPath”
[clause]
A value of type clause.types/NamespacePath
Part 2 “expression”
[clause]
A value of type clause.types/Expression
Option 2 “retrieve”
Retrieves an expression from the given namespace path, or returns null if not found.
Examples:
C("awesomeapp/TodoItem")
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “nsPath”
[clause]
A value of type clause.types/NamespacePath
Return Value Clause Graph
[or] either one of

Should be one of the following:

Option 1
[clause]
A value of type clause.types/Undefined
Option 2
[clause]

clause.compose/


cat()
  function
Syntax
Clause Description
fclause( {
  <args>: and(
    cat(
      "expressions", or(
        "withLabels", or(
          zeroOrMore( cat(
            "name", ClauseLabel, 
            "comment", zeroOrOne( String ), 
            "expr", Expression
          ) ), 
          collOf( cat(
            "name", ClauseLabel, 
            "comment", zeroOrOne( String ), 
            "expr", Expression
          ) )
        ), 
        "withoutLabels", zeroOrMore( Expression )
      ), 
      "options", zeroOrOne( PlainObject )
    ), 
    noDupelicateLabels
  ), 
  <ret>: Clause
} )
Argument Clause Graph
[and]

Should satisfy all of the following expression:

Condition 1
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expressions”
[or] either one of

Should be one of the following:

Option 1 “withLabels”
[or] either one of

Should be one of the following:

Option 1
[*] zero or more
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “name”
[clause]
A value of type clause.types/ClauseLabel
Part 2 “comment”
[?] optional
[clause]
A value of type clause.types/String
TODO
Part 3 “expr”
[clause]
A value of type clause.types/Expression
TODO
Option 2
[collOf] a collection of
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “name”
[clause]
A value of type clause.types/ClauseLabel
Part 2 “comment”
[?] optional
[clause]
A value of type clause.types/String
TODO
Part 3 “expr”
[clause]
A value of type clause.types/Expression
TODO
Option 2 “withoutLabels”
[*] zero or more
[clause]
A value of type clause.types/Expression
TODO
Part 2 “options”
[?] optional
[clause]
A value of type clause.types/PlainObject
TODO
Condition 2
[pred] satisfies predicate
A value that satisfies noDupelicateLabels()
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
or()
  function
Syntax
Clause Description
fclause( {
  <args>: and(
    cat(
      "expressions", or(
        "withLabels", or(
          zeroOrMore( cat(
            "name", ClauseLabel, 
            "comment", zeroOrOne( String ), 
            "expr", Expression
          ) ), 
          collOf( cat(
            "name", ClauseLabel, 
            "comment", zeroOrOne( String ), 
            "expr", Expression
          ) )
        ), 
        "withoutLabels", zeroOrMore( Expression )
      ), 
      "options", zeroOrOne( PlainObject )
    ), 
    noDupelicateLabels
  ), 
  <ret>: Clause
} )
Argument Clause Graph
[and]

Should satisfy all of the following expression:

Condition 1
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expressions”
[or] either one of

Should be one of the following:

Option 1 “withLabels”
[or] either one of

Should be one of the following:

Option 1
[*] zero or more
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “name”
[clause]
A value of type clause.types/ClauseLabel
Part 2 “comment”
[?] optional
[clause]
A value of type clause.types/String
TODO
Part 3 “expr”
[clause]
A value of type clause.types/Expression
TODO
Option 2
[collOf] a collection of
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “name”
[clause]
A value of type clause.types/ClauseLabel
Part 2 “comment”
[?] optional
[clause]
A value of type clause.types/String
TODO
Part 3 “expr”
[clause]
A value of type clause.types/Expression
TODO
Option 2 “withoutLabels”
[*] zero or more
[clause]
A value of type clause.types/Expression
TODO
Part 2 “options”
[?] optional
[clause]
A value of type clause.types/PlainObject
TODO
Condition 2
[pred] satisfies predicate
A value that satisfies noDupelicateLabels()
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
zeroOrMore()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expr", Expression, 
    "opts", zeroOrOne( Object )
  ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expr”
[clause]
A value of type clause.types/Expression
Part 2 “opts”
[?] optional
[clause]
A value of type clause.types/Object
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
oneOrMore()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expr", Expression, 
    "opts", zeroOrOne( Object )
  ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expr”
[clause]
A value of type clause.types/Expression
Part 2 “opts”
[?] optional
[clause]
A value of type clause.types/Object
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
zeroOrOne()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expr", Expression, 
    "opts", zeroOrOne( Object )
  ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expr”
[clause]
A value of type clause.types/Expression
Part 2 “opts”
[?] optional
[clause]
A value of type clause.types/Object
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
and()
  function
Syntax
Clause Description
fclause( {
  <args>: oneOrMore( Expression ), 
  <ret>: Clause
} )
Argument Clause Graph
[+] one or more
[clause]
A value of type clause.types/Expression
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
collOf()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expr", Expression, 
    "opts", zeroOrOne( Object )
  ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expr”
[clause]
A value of type clause.types/Expression
Part 2 “opts”
[?] optional
[clause]
A value of type clause.types/Object
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
mapOf()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "keyExpression", Expression, 
    "valExpression", Expression
  ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “keyExpression”
[clause]
A value of type clause.types/Expression
Part 2 “valExpression”
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
shape()
  function
Syntax
  • (shape( {optional{requiredFields{keyoneOf("req", "required"), val(isPropName)*}, optionalFields{keyoneOf("opt", "optional"), val{(isPropName)* | mapOf( {keyString, valExpression} )}}}} )) → Clause
  • (shape( {optional{requiredFields{keyoneOf("req", "required"), val(isPropName)*}, optionalFields{keyoneOf("opt", "optional"), val{(isPropName)* | mapOf( {keyString, val(keyExpression: Expression, valExpression: Expression)} )}}}} )) → Clause
  • (shape( {optional{requiredFields{keyoneOf("req", "required"), valmapOf( {keyString, valExpression} )}, optionalFields{keyoneOf("opt", "optional"), val{(isPropName)* | mapOf( {keyString, val{Expression | (keyExpression: Expression, valExpression: Expression)}} )}}}} )) → Clause
  • (shape( {optional{requiredFields{keyoneOf("req", "required"), valmapOf( {keyString, val(keyExpression: Expression, valExpression: Expression)} )}, optionalFields{keyoneOf("opt", "optional"), val{(isPropName)* | mapOf( {keyString, val{Expression | (keyExpression: Expression, valExpression: Expression)}} )}}}} )) → Clause
Clause Description
fclause( {
  <args>: cat( "shapeArgs", shape( {
    <optional>: {
      "requiredFields": {
        <key>: oneOf("req", "required"), 
        <val>: or(
          "keyList", zeroOrMore( isPropName ), 
          "fieldDefs", mapOf( {
            <key>: String, 
            <val>: or(
              "valExpressionOnly", Expression, 
              "keyValExprPair", cat(
                "keyExpression", Expression, 
                "valExpression", Expression
              )
            )
          } )
        )
      }, 
      "optionalFields": {
        <key>: oneOf("opt", "optional"), 
        <val>: or(
          "keyList", zeroOrMore( isPropName ), 
          "fieldDefs", mapOf( {
            <key>: String, 
            <val>: or(
              "valExpressionOnly", Expression, 
              "keyValExprPair", cat(
                "keyExpression", Expression, 
                "valExpression", Expression
              )
            )
          } )
        )
      }
    }
  } ) ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “shapeArgs”
[shape]
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
any()
  function
Clause Description
fclause( {
  <ret>: Clause
} )
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
wall()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( Expression ), 
  <ret>: Expression
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/Expression
fclause()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( shape( {
    <optional>: {
      "args": and(
        isArray, 
        Expression
      ), 
      "ret": Expression, 
      "fn": fclause( {
        <args>: cat(
          "conformedArguments", any, 
          "conformedReturnValue", any
        ), 
        <ret>: any
      } )
    }
  } ) )
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1
[shape]
TODO
nullable()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( Expression ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
undefinable()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( Expression ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/Clause
maybe()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( Expression ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/Clause

clause.compose.string/


sCat()
  function
Syntax
Examples

var StrClause = C.cat('part1', C.zeroOrMore(C.sCat('foo')),
                      'part2.5', C.zeroOrMore(C.sCat('i am optional')),
                      'part2', C.zeroOrMore(C.sCat('bar')));

C.conform(StrClause, 'foofoofoobarbar');
Clause Description
fclause( {
  <args>: cat( "string", String ), 
  <ret>: Clause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “string”
[clause]
A value of type clause.types/String
Return Value Clause Graph
[clause]
A value of type clause.types/Clause

clause.utils/


enforce()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expression", Expression, 
    "valueToCheck", any()
  ), 
  <ret>: Undefined
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expression”
[clause]
A value of type clause.types/Expression
Part 2 “valueToCheck”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Undefined
conform()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expression", Expression, 
    "valueToConform", any()
  ), 
  <ret>: or(
    "conformedValue", any(), 
    "problem", Problem
  )
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expression”
[clause]
A value of type clause.types/Expression
Part 2 “valueToConform”
[any]
Any value.
Return Value Clause Graph
[or] either one of

Should be one of the following:

Option 1 “conformedValue”
[any]
Any value.
Option 2 “problem”
[pred] satisfies predicate
A value of type clause.types/Problem
delayed()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "getFn", fclause( {
    <args>: cat(), 
    <ret>: Expression
  } ) ), 
  <ret>: DelayedClause
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “getFn”
[fclause] a function
Syntax
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Return Value Clause Graph
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/DelayedClause
describe()
  function
Returns an abbreviated description of the clause as a simple tree structure.
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expression", Expression, 
    "replacer", zeroOrOne( fclause( {
      <args>: cat( Expression ), 
      <ret>: or(
        Undefined, 
        Null, 
        collOf( String )
      )
    } ) ), 
    "space", zeroOrOne( isNatInt )
  ), 
  <ret>: String
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expression”
[or] either one of
A value of type clause.types/Expression
Part 2 “replacer”
[?] optional
[fclause] a function
Syntax
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[or] either one of

Should be one of the following:

Option 1
[clause]
A value of type clause.types/Undefined
Option 2
[clause]
A value of type clause.types/Null
Option 3
[collOf] a collection of
[clause]
A value of type clause.types/String
TODO
TODO
Part 3 “space”
[?] optional
[pred] satisfies predicate
A value that satisfies isNatInt()
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/String
sExpression()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "expression", Expression ), 
  <ret>: SExpression
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expression”
[or] either one of
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/SExpression

clause.preds/


not()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "predicateToNegate", Predicate ), 
  <ret>: fclause( {
    <args>: cat( "x", any() ), 
    <ret>: Bool
  } )
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “predicateToNegate”
[fclause] a function
A value of type clause.types/Predicate
Return Value Clause Graph
[fclause] a function
Syntax
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isObj()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isPlainObj()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isStr()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isArray()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isDate()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isNull()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isUndefined()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
notEmpty()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isBool()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isFn()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isNum()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isInt()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isNatInt()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
isUuid()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", String ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[clause]
A value of type clause.types/String
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
oneOf()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "valueOptions", collOf( Primitive ) ), 
  <ret>: fclause( {
    <args>: cat( "x", any() ), 
    <ret>: Bool
  } )
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “valueOptions”
[collOf] a collection of
[or] either one of
A value of type clause.types/Primitive
TODO
Return Value Clause Graph
[fclause] a function
Syntax
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
equals()
  function
Syntax
  • (valueToCompareWith: any) → (x: any) → Bool
Clause Description
fclause( {
  <args>: cat( "valueToCompareWith", any() ), 
  <ret>: fclause( {
    <args>: cat( "x", any() ), 
    <ret>: Bool
  } )
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “valueToCompareWith”
[any]
Any value.
Return Value Clause Graph
[fclause] a function
Syntax
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
instanceOf()
  function
Syntax
  • (isFunction) → (x: any) → Bool
Clause Description
fclause( {
  <args>: cat( "instanceType", isFunction ), 
  <ret>: fclause( {
    <args>: cat( "x", any() ), 
    <ret>: Bool
  } )
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “instanceType”
[pred] satisfies predicate
A value that satisfies isFunction()
Return Value Clause Graph
[fclause] a function
Syntax
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool

clause.namespace/


set()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "nsPath", NamespacePath, 
    "expression", Expression
  ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “nsPath”
[clause]
A value of type clause.types/NamespacePath
Part 2 “expression”
[clause]
A value of type clause.types/Expression
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
get()
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "nsPath", NamespacePath ), 
  <ret>: ClauseReference
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “nsPath”
[clause]
A value of type clause.types/NamespacePath
Return Value Clause Graph
[clause]
resolve()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "expression", Expression, 
    "registry", zeroOrOne( Object )
  ), 
  <ret>: NamespacePath
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “expression”
[clause]
A value of type clause.types/Expression
Part 2 “registry”
[?] optional
[clause]
A value of type clause.types/Object
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/NamespacePath
setMeta()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "source", or(
      "namespacePath", NamespacePath, 
      "expression", Expression
    ), 
    "metaObj", Object, 
    "registry", zeroOrOne( Object )
  ), 
  <ret>: Undefined
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “source”
[or] either one of

Should be one of the following:

Option 1 “namespacePath”
[clause]
A value of type clause.types/NamespacePath
Option 2 “expression”
[clause]
A value of type clause.types/Expression
Part 2 “metaObj”
[clause]
A value of type clause.types/Object
Part 3 “registry”
[?] optional
[clause]
A value of type clause.types/Object
TODO
Return Value Clause Graph
[clause]
A value of type clause.types/Undefined
getMeta()
  function
Syntax
Clause Description
fclause( {
  <args>: cat(
    "source", or(
      "namespacePath", NamespacePath, 
      "expression", Expression
    ), 
    "registry", zeroOrOne( Object )
  ), 
  <ret>: or(
    Null, 
    Undefined, 
    Object
  )
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “source”
[or] either one of

Should be one of the following:

Option 1 “namespacePath”
[clause]
A value of type clause.types/NamespacePath
Option 2 “expression”
[clause]
A value of type clause.types/Expression
Part 2 “registry”
[?] optional
[clause]
A value of type clause.types/Object
TODO
Return Value Clause Graph
[or] either one of

Should be one of the following:

Option 1
[clause]
A value of type clause.types/Null
Option 2
[clause]
A value of type clause.types/Undefined
Option 3
[clause]
A value of type clause.types/Object

clause.types/


Expression
  or

Should be one of the following:

Option 1 “clause”
[clause]
A value of type clause.types/Clause
Option 2 “pred”
[pred] satisfies predicate
A value that satisfies isPred()
Primitive
  or

Should be one of the following:

Option 1
[clause]
A value of type clause.types/String
Option 2
[clause]
A value of type clause.types/Number
Option 3
[clause]
A value of type clause.types/Bool
Option 4
[clause]
A value of type clause.types/Null
Option 5
[clause]
A value of type clause.types/Undefined
Clause
  predicate
A value that satisfies instanceOf_Clause_()
FClause
  predicate
A value that satisfies isFclause()
Predicate
  function
Syntax
Clause Description
fclause( {
  <args>: cat( "x", any() ), 
  <ret>: Bool
} )
Argument Clause Graph
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “x”
[any]
Any value.
Return Value Clause Graph
[clause]
A value of type clause.types/Bool
DelayedClause
  predicate
A value that satisfies instanceOf_DelayedClause_()
ClauseReference
  predicate
A value that satisfies isClauseRef()
Problem
  predicate
A value that satisfies isProblem()
NamespaceObj
  shape
TODO
NamespacePath
  predicate
A value that satisfies isNamespacePath()
ClauseLabel
  predicate
A value that satisfies isClauseName()
SExpression
  wall
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “head”
[clause]
A value of type clause.types/Expression
Part 2 “params”
[or] either one of

Should be one of the following:

Option 1 “labelled”
[*] zero or more
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “label”
[or] either one of

Should be one of the following:

Option 1 “str”
[clause]
A value of type clause.types/String
Option 2 “quoted”
[pred] satisfies predicate
A value that satisfies instanceOf_Quoted_()
Part 2 “item”
[or] either one of

Should be one of the following:

Option 1 “sExpression”
[clause]
A value of type clause.types/SExpression
Option 2 “quotedParamsMap”
[and]

Should satisfy all of the following expression:

Condition 1
[pred] satisfies predicate
A value that satisfies instanceOf_QuotedParamsMap_()
Condition 2
[map_of]
TODO
Option 3 “unquotedParamsMap”
[and]

Should satisfy all of the following expression:

Condition 1
[pred] satisfies predicate
A value that satisfies instanceOf_UnquotedParamsMap_()
Condition 2
[map_of]
TODO
Option 4 “optionsObj”
[clause]
A value of type clause.types/PlainObject
Option 5 “recursive”
[pred] satisfies predicate
A value that satisfies instanceOf_Recursive_()
TODO
Option 2 “unlabelled”
[*] zero or more
[cat] a sequence of

Should be an ordered list of the following:

Part 1 “item”
[or] either one of

Should be one of the following:

Option 1 “sExpression”
[clause]
A value of type clause.types/SExpression
Option 2 “quotedParamsMap”
[and]

Should satisfy all of the following expression:

Condition 1
[pred] satisfies predicate
A value that satisfies instanceOf_QuotedParamsMap_()
Condition 2
[map_of]
TODO
Option 3 “unquotedParamsMap”
[and]

Should satisfy all of the following expression:

Condition 1
[pred] satisfies predicate
A value that satisfies instanceOf_UnquotedParamsMap_()
Condition 2
[map_of]
TODO
Option 4 “optionsObj”
[clause]
A value of type clause.types/PlainObject
Option 5 “recursive”
[pred] satisfies predicate
A value that satisfies instanceOf_Recursive_()
TODO
TODO
String
  predicate
A value that satisfies isString()
Bool
  predicate
A value that satisfies isBool()
Number
  predicate
A value that satisfies isNum()
Object
  predicate
A value that satisfies isObject()
PlainObject
  predicate
A value that satisfies isPlainObject()
Undefined
  predicate
A value that satisfies isUndefined()
Null
  predicate
A value that satisfies isNull()