diff --git a/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt index a3710d093d..3b8217f505 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt @@ -5,7 +5,7 @@ import com.ivy.fp.action.FPAction import com.ivy.fp.action.then import com.ivy.wallet.domain.data.core.Account import com.ivy.wallet.domain.pure.AccountValueFunctions -import com.ivy.wallet.domain.pure.calcValues +import com.ivy.wallet.domain.pure.core.calcValues import com.ivy.wallet.domain.pure.data.ClosedTimeRange import java.math.BigDecimal import javax.inject.Inject diff --git a/app/src/main/java/com/ivy/wallet/domain/pure/core/Utils.kt b/app/src/main/java/com/ivy/wallet/domain/pure/Utils.kt similarity index 93% rename from app/src/main/java/com/ivy/wallet/domain/pure/core/Utils.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/Utils.kt index 06d63fde6e..658ea551c4 100644 --- a/app/src/main/java/com/ivy/wallet/domain/pure/core/Utils.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/Utils.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.pure.core +package com.ivy.wallet.domain.pure import arrow.core.NonEmptyList import java.math.BigDecimal diff --git a/app/src/main/java/com/ivy/wallet/domain/pure/IvyCore.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/IvyCore.kt similarity index 74% rename from app/src/main/java/com/ivy/wallet/domain/pure/IvyCore.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/core/IvyCore.kt index e93dafd137..d6f2f7ee83 100644 --- a/app/src/main/java/com/ivy/wallet/domain/pure/IvyCore.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/core/IvyCore.kt @@ -1,10 +1,8 @@ -package com.ivy.wallet.domain.pure +package com.ivy.wallet.domain.pure.core import arrow.core.NonEmptyList import com.ivy.fp.Pure import com.ivy.wallet.domain.data.core.Transaction -import com.ivy.wallet.domain.pure.core.ValueFunction -import com.ivy.wallet.domain.pure.core.calculateValueFunctionsSum import java.math.BigDecimal @Pure diff --git a/app/src/main/java/com/ivy/wallet/domain/pure/core/TransactionFunctions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/TrnFunctions.kt similarity index 100% rename from app/src/main/java/com/ivy/wallet/domain/pure/core/TransactionFunctions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/core/TrnFunctions.kt diff --git a/app/src/main/java/com/ivy/wallet/domain/pure/core/Uncertain.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/Uncertain.kt deleted file mode 100644 index 912eaf276b..0000000000 --- a/app/src/main/java/com/ivy/wallet/domain/pure/core/Uncertain.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.ivy.wallet.domain.pure.core - -data class Uncertain, V>( - val error: E, - val value: V -) { - fun isCertain(): Boolean { - return error.isEmpty() - } -} \ No newline at end of file diff --git a/app/src/main/java/com/ivy/wallet/domain/pure/core/ValueFunction.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/ValueFunction.kt index 7c464e7d8b..33faaa9ae7 100644 --- a/app/src/main/java/com/ivy/wallet/domain/pure/core/ValueFunction.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/core/ValueFunction.kt @@ -2,6 +2,9 @@ package com.ivy.wallet.domain.pure.core import arrow.core.NonEmptyList import com.ivy.wallet.domain.data.core.Transaction +import com.ivy.wallet.domain.pure.mapIndexedNel +import com.ivy.wallet.domain.pure.mapIndexedNelSuspend +import com.ivy.wallet.domain.pure.nonEmptyListOfZeros import java.math.BigDecimal typealias ValueFunction = (Transaction, A) -> BigDecimal