SKICombinators UT¶
computation.spad line 1631 [edit on github]
UT: VarCat
parse result includes term returned and new index
- =: (%, %) -> Boolean
return
true
if equal (deep search) that is: all terms at all levels in tree must be equal to returntrue
all terms must be exactly equal, not just equivalent, that is SKK=I will returnfalse
even though ‘SKK’ and ‘I’ have the same effect
- atom?: % -> Boolean
returns
true
if this is an atom, that is a leaf node otherwise returnfalse
if this is a compound term
- coerce: % -> OutputForm
from CoercibleTo OutputForm
- freeVariable?: (%, UT) -> Boolean
the variable indicated by
's'
is free if it does not appear in node'n'
or any of its subnodes.
- getChildren: % -> List %
returns child nodes if this is a compound term otherwise returns []
- getVariable: % -> UT
returns the variable, if this is not a variable then return
I
- I: () -> %
Constructs a
I
combinator
- isI?: % -> Boolean
returns
true
if this is anI
combinator node
- isK?: % -> Boolean
returns
true
if this is aK
combinator node
- isS?: % -> Boolean
returns
true
if this is aS
combinator node
- K: () -> %
Constructs a
K
combinator
- latex: % -> String
from SetCategory
- parseSki: String -> %
Constructs combinators from a string
- parseTerm: (String, NonNegativeInteger) -> Record(rft: %, pout: NonNegativeInteger)
parseTerm is used by parseSki. It would rarely be called externally but it is here to allow it to call parseSki that is to allow circular calls
- redux: % -> %
weak reduction - apply this combinator to rearrange its subnodes then apply recursively to its subnodes.
- S: () -> %
Constructs a
S
combinator
- ski: (%, %) -> %
Constructs a node combinator over combinators
- ski: UT -> %
Constructs variable combinator
- toString: % -> String
output
- variable?: % -> Boolean
returns
true
if this is an variable