|
Orbital library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorbital.logic.functor.Functionals.Paramorphism
public static class Functionals.Paramorphism
Paramorphism recursion functional scheme (barbed wire).
A paramorphism is denoted by barbed wires.
Functionals.barbedwire(Object, BinaryFunction, Iterator),
Functionals.barbedwire(int, BinaryFunction, int),
"Lambert Meertens. Paramorphisms. In: Formal Aspects of Computing, 1990.",
Meijer, E. and Fokkinga, M.M. and Paterson, R., Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire, FPCA91: Functional Programming Languages and Computer Architecture, pp. 124--144, volume 523, Lecture Notes in Computer Science, Springer-Verlag, 1991.,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface orbital.logic.functor.Function |
|---|
Function.Composite |
| Nested classes/interfaces inherited from interface orbital.logic.functor.Functor |
|---|
Functor.Specification |
| Field Summary |
|---|
| Fields inherited from interface orbital.logic.functor.Function |
|---|
callTypeDeclaration |
| Constructor Summary | |
|---|---|
Functionals.Paramorphism(java.lang.Object b,
BinaryFunction f)
Constructs a new paramorphism b,f:A*->B. |
|
| Method Summary | |
|---|---|
java.lang.Object |
apply(java.lang.Object a)
b,f a. |
boolean |
equals(java.lang.Object o)
. |
int |
hashCode()
|
java.lang.String |
toString()
Returns a string representation of the Functor. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Functionals.Paramorphism(java.lang.Object b,
BinaryFunction f)
b - is the basevalue b in B to use.f - is a binary function f:A×(A*||B)->B.| Method Detail |
|---|
public boolean equals(java.lang.Object o)
FunctorNote that functors will often provide intensional equality only, since the mathematical notion of extensional equality for functions and predicates is undecidable anyway (Proposition of Rice). Nevertheless implementations are encouraged to provide a larger subset of extensional equality as far as possible.
equals in interface Functorequals in class java.lang.Objectpublic int hashCode()
hashCode in interface FunctorhashCode in class java.lang.Objectpublic final java.lang.Object apply(java.lang.Object a)
| para Ø | = | b |
| para [a|as] | = | f(a, <as, para as>) |
| b,f := barbedwire(b,f) := para | ||
apply in interface Functiona - is a generalized iteratable over a list of objects.
public java.lang.String toString()
Functor
This method is already provided in Object.toString().
If it is overwritten it should return a nice name for the functor.
toString in interface FunctortoString in class java.lang.Object
|
Orbital library 1.2.0: 23 Apr 2008 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||