Package fj.data.hlist
Class HPre.HAdd<A extends HPre.HNat<A>,B extends HPre.HNat<B>,C extends HPre.HNat<C>>
java.lang.Object
fj.data.hlist.HPre.HAdd<A,B,C>
- Enclosing class:
HPre
public static final class HPre.HAdd<A extends HPre.HNat<A>,B extends HPre.HNat<B>,C extends HPre.HNat<C>>
extends Object
Type-level integer arithmetic
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <N extends HPre.HNat<N>,
M extends HPre.HNat<M>, R extends HPre.HNat<R>, H extends HPre.HAdd<N, HPre.HSucc<M>, R>>
HPre.HAdd<HPre.HSucc<N>, HPre.HSucc<M>, HPre.HSucc<R>> add
(HPre.HSucc<N> a, HPre.HSucc<M> b, H h) The sum of numbers a and b is one greater than the sum of b and the predecessor of a.static <N extends HPre.HNat<N>>
HPre.HAdd<HPre.HSucc<N>, HPre.HZero, HPre.HSucc<N>> add
(HPre.HSucc<N> a, HPre.HZero b) The sum of zero and any other number is that number.static <N extends HPre.HNat<N>>
HPre.HAdd<HPre.HZero, HPre.HSucc<N>, HPre.HSucc<N>> add
(HPre.HZero a, HPre.HSucc<N> b) The sum of zero and any other number is that number.sum()
-
Field Details
-
sum
-
-
Constructor Details
-
HAdd
-
-
Method Details
-
sum
-
add
public static <N extends HPre.HNat<N>> HPre.HAdd<HPre.HZero,HPre.HSucc<N>, addHPre.HSucc<N>> (HPre.HZero a, HPre.HSucc<N> b) The sum of zero and any other number is that number. -
add
public static <N extends HPre.HNat<N>> HPre.HAdd<HPre.HSucc<N>,HPre.HZero, addHPre.HSucc<N>> (HPre.HSucc<N> a, HPre.HZero b) The sum of zero and any other number is that number. -
add
public static <N extends HPre.HNat<N>,M extends HPre.HNat<M>, HPre.HAdd<HPre.HSucc<N>,R extends HPre.HNat<R>, H extends HPre.HAdd<N, HPre.HSucc<M>, R>> HPre.HSucc<M>, addHPre.HSucc<R>> (HPre.HSucc<N> a, HPre.HSucc<M> b, H h) The sum of numbers a and b is one greater than the sum of b and the predecessor of a.
-