Skip to content

Commit 801430a

Browse files
Merge pull request #29 from JuliaSymbolics/shashi-patch-1
reorder api tems in the readme
2 parents 453466e + eea4436 commit 801430a

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ and [Metatheory.jl](https://github.com/0x0f0f0f/Metatheory.jl).
1414
Returns `true` if `x` is an expression tree (an S-expression). If true, `head`
1515
and `children` methods must be defined for `x`.
1616

17-
#### `iscall(x::T)`
18-
19-
Returns `true` if `x` is a function call expression. If true, `operation`, `arguments` must also be defined for `x::T`.
20-
21-
2217
#### `head(x)`
2318

2419
Returns the head of the S-expression.
@@ -27,17 +22,6 @@ Returns the head of the S-expression.
2722

2823
Returns the children (aka tail) of the S-expression.
2924

30-
31-
#### `operation(x)`
32-
33-
Returns the function a function call expression is calling. `iscall(x)` must be
34-
true as a precondition.
35-
36-
#### `arguments(x)`
37-
38-
Returns the arguments to the function call in a function call expression.
39-
`iscall(x)` must be true as a precondition.
40-
4125
#### `maketerm(T, head, children, type=nothing, metadata=nothing)`
4226

4327
Constructs an expression. `T` is a constructor type, `head` and `children` are
@@ -57,6 +41,20 @@ Packages providing expression types _must_ implement this method for each expres
5741
If your types do not support type information or metadata, you still need to accept
5842
these arguments and may choose to not use them.
5943

44+
#### `iscall(x::T)`
45+
46+
Returns `true` if `x` is a function call expression. If true, `operation`, `arguments` must also be defined for `x::T`.
47+
48+
#### `operation(x)`
49+
50+
Returns the function a function call expression is calling. `iscall(x)` must be
51+
true as a precondition.
52+
53+
#### `arguments(x)`
54+
55+
Returns the arguments to the function call in a function call expression.
56+
`iscall(x)` must be true as a precondition.
57+
6058
### Optional
6159

6260
#### `arity(x)`

0 commit comments

Comments
 (0)