├── .gitignore ├── LICENSE ├── README.md ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── settings.gradle └── src └── main ├── kotlin └── fp │ └── kotlin │ └── example │ ├── chapter01 │ ├── FirstClassFunctions.kt │ ├── FpCalculator.kt │ ├── InfiniteValue.kt │ ├── LazyEvaluation.kt │ ├── OopCalculator.kt │ ├── PureFunction.kt │ ├── ReferentialTransparency.kt │ └── SimpleCalculator.kt │ ├── chapter02 │ ├── PatternMatching.kt │ ├── StandardLib.kt │ ├── Variant.kt │ ├── exercise │ │ └── 2-1-kotlinExtension.kt │ └── solution │ │ └── 2-1-kotlinExtension.kt │ ├── chapter03 │ ├── DynamicVsRecursion.kt │ ├── HowToMakeRecursion.kt │ ├── Memoization.kt │ ├── MutualRecursion.kt │ ├── PracticalExamples.kt │ ├── Recursion.kt │ ├── TailRecursion.kt │ ├── Trampoline.kt │ ├── exercise │ │ ├── 3-10-factorial.kt │ │ ├── 3-11-factorial.kt │ │ ├── 3-12-factorial.kt │ │ ├── 3-13-power.kt │ │ ├── 3-14-toBinary.kt │ │ ├── 3-15-replicate.kt │ │ ├── 3-16-elem.kt │ │ ├── 3-17-squareRoot-divideTwo.kt │ │ ├── 3-18-squareRoot-divideTwo.kt │ │ ├── 3-19-factorial.kt │ │ ├── 3-2-power.kt │ │ ├── 3-3-factorial.kt │ │ ├── 3-4-toBinary.kt │ │ ├── 3-5-replicate.kt │ │ ├── 3-6-elem.kt │ │ ├── 3-7-takeSequence.kt │ │ ├── 3-8-quicksort.kt │ │ └── 3-9-gcd.kt │ └── solution │ │ ├── 3-10-factorial.kt │ │ ├── 3-11-factorial.kt │ │ ├── 3-12-factorial.kt │ │ ├── 3-13-power.kt │ │ ├── 3-14-toBinary.kt │ │ ├── 3-15-replicate.kt │ │ ├── 3-16-elem.kt │ │ ├── 3-17-squareRoot-divideTwo.kt │ │ ├── 3-18-squareRoot-divideTwo.kt │ │ ├── 3-19-factorial.kt │ │ ├── 3-2-power.kt │ │ ├── 3-3-factorial.kt │ │ ├── 3-4-toBinary.kt │ │ ├── 3-5-replicate.kt │ │ ├── 3-6-elem.kt │ │ ├── 3-7-takeSequence.kt │ │ ├── 3-8-quicksort.kt │ │ └── 3-9-gcd.kt │ ├── chapter04 │ ├── CalculatorExample.kt │ ├── CallbackListener.kt │ ├── CompositionFunctions.kt │ ├── ConciseCodeExample.kt │ ├── CurriedFunctions.kt │ ├── HigherOrderFunctions.kt │ ├── NonCallbackListener.kt │ ├── PartialFunction.kt │ ├── PartiallyAppliedFunction.kt │ ├── PracticalExamples.kt │ ├── exercise │ │ ├── 4-1-invokeOrElse-orElse.kt │ │ ├── 4-2-partial.kt │ │ ├── 4-3-max.kt │ │ ├── 4-4-min.kt │ │ ├── 4-5-powerWithMax.kt │ │ ├── 4-6-powerComposeMax.kt │ │ ├── 4-7-takeWhile.kt │ │ └── 4-8-takeWhile.kt │ └── solution │ │ ├── 4-1-invokeOrElse-orElse.kt │ │ ├── 4-2-partial.kt │ │ ├── 4-3-max.kt │ │ ├── 4-4-min.kt │ │ ├── 4-5-powerWithMax.kt │ │ ├── 4-6-powerComposeMax.kt │ │ ├── 4-7-takeWhile.kt │ │ └── 4-8-takeWhile.kt │ ├── chapter05 │ ├── FilterExample.kt │ ├── FunList.kt │ ├── FunListVsFunStream.kt │ ├── FunStream.kt │ ├── ImperativeVsFunctional.kt │ ├── Main.kt │ ├── MapExample.kt │ ├── PracticalExamples.kt │ ├── Sum.kt │ ├── Validator.kt │ ├── exercise │ │ ├── 5-1-intList.kt │ │ ├── 5-10-filterByFoldLeft.kt │ │ ├── 5-11-reverseByFoldRight.kt │ │ ├── 5-12-filterByFoldRight.kt │ │ ├── 5-13-zip.kt │ │ ├── 5-14-associate.kt │ │ ├── 5-15-groupBy.kt │ │ ├── 5-16-test.kt │ │ ├── 5-17-sumByFunStream.kt │ │ ├── 5-18-productByFunStream.kt │ │ ├── 5-19-appendTailByFunStream.kt │ │ ├── 5-2-doubleList.kt │ │ ├── 5-20-filterByFunStream.kt │ │ ├── 5-21-mapByFunStream.kt │ │ ├── 5-22-takeByFunStream.kt │ │ ├── 5-23-toString.kt │ │ ├── 5-24-squareRoot.kt │ │ ├── 5-3-getHead.kt │ │ ├── 5-4-drop.kt │ │ ├── 5-5-dropWhile.kt │ │ ├── 5-6-take.kt │ │ ├── 5-7-takeWhile.kt │ │ ├── 5-8-indexedMap.kt │ │ └── 5-9-maximumByFoldLeft.kt │ └── solution │ │ ├── 5-1-intList.kt │ │ ├── 5-10-filterByFoldLeft.kt │ │ ├── 5-11-reverseByFoldRight.kt │ │ ├── 5-12-filterByFoldRight.kt │ │ ├── 5-13-zip.kt │ │ ├── 5-14-associate.kt │ │ ├── 5-15-groupBy.kt │ │ ├── 5-16-test.kt │ │ ├── 5-17-sumByFunStream.kt │ │ ├── 5-18-productByFunStream.kt │ │ ├── 5-19-appendTailByFunStream.kt │ │ ├── 5-2-doubleList.kt │ │ ├── 5-20-filterByFunStream.kt │ │ ├── 5-21-mapByFunStream.kt │ │ ├── 5-22-takeByFunStream.kt │ │ ├── 5-23-toString.kt │ │ ├── 5-24-squareRoot.kt │ │ ├── 5-3-getHead.kt │ │ ├── 5-4-drop.kt │ │ ├── 5-5-dropWhile.kt │ │ ├── 5-6-take.kt │ │ ├── 5-7-takeWhile.kt │ │ ├── 5-8-indexedMap.kt │ │ └── 5-9-maximumByFoldLeft.kt │ ├── chapter06 │ ├── Color.kt │ ├── Expr.kt │ ├── Maybe.kt │ ├── Mixin.kt │ ├── PracticalExamples.kt │ ├── RecursiveDataStructure.kt │ ├── TypeclassExamples.kt │ ├── exercise │ │ ├── 6-1-tree.kt │ │ ├── 6-2-treeInsert.kt │ │ ├── 6-3-treeInsertSOF.kt │ │ ├── 6-4-treeInsertTailrec.kt │ │ └── 6-5-contains.kt │ ├── producttype │ │ └── ProductAlgebraicDataType.kt │ ├── solution │ │ ├── 6-1-tree.kt │ │ ├── 6-2-treeInsert.kt │ │ ├── 6-3-treeInsertSOF.kt │ │ ├── 6-4-treeInsertTailrec.kt │ │ └── 6-5-contains.kt │ └── sumtype │ │ └── SumAlgebraicDataType.kt │ ├── chapter07 │ ├── Either.kt │ ├── Function.kt │ ├── Functor.kt │ ├── FunctorFirstLaw.kt │ ├── FunctorSecondLaw.kt │ ├── Maybe.kt │ ├── PracticalExamples.kt │ ├── Tree.kt │ ├── WrongFunctor.kt │ ├── exercise │ │ ├── 7_1_functor.kt │ │ └── 7_2_functorLawFunList.kt │ └── solution │ │ ├── 7_1_functor.kt │ │ └── 7_2_functorLawFunList.kt │ ├── chapter08 │ ├── AMaybe.kt │ ├── Applicative.kt │ ├── ApplicativeAdditionalLaw.kt │ ├── ApplicativeCompositionLaw.kt │ ├── ApplicativeHomomorphismLaw.kt │ ├── ApplicativeIdentityLaw.kt │ ├── ApplicativeInterchangeLaw.kt │ ├── EitherApplicative.kt │ ├── LiftA2.kt │ ├── MaybeApplicative.kt │ ├── SequenceA.kt │ ├── TreeApplicative.kt │ ├── exercise │ │ ├── 8_10_applicativeLawInterchange.kt │ │ ├── 8_11_applicativeWithFunctor.kt │ │ ├── 8_12_liftAFunList.kt │ │ ├── 8_13_liftTree.kt │ │ ├── 8_14_liftEither.kt │ │ ├── 8_15_tripleLift.kt │ │ ├── 8_16_sequenceAFunList.kt │ │ ├── 8_17_sequenceTree.kt │ │ ├── 8_18_sequenceEither.kt │ │ ├── 8_1_functor.kt │ │ ├── 8_2_applicative.kt │ │ ├── 8_3_listApplicative.kt │ │ ├── 8_4_treeApplicative.kt │ │ ├── 8_5_treeApplicative2.kt │ │ ├── 8_6_zipApplicative.kt │ │ ├── 8_7_applicativeLawIdentify.kt │ │ ├── 8_8_applicativeLawComposition.kt │ │ └── 8_9_applicativeLawHomomorphism.kt │ └── solution │ │ ├── 8_10_applicativeLawInterchange.kt │ │ ├── 8_11_applicativeWithFunctor.kt │ │ ├── 8_12_liftAFunList.kt │ │ ├── 8_13_liftTree.kt │ │ ├── 8_14_liftEither.kt │ │ ├── 8_15_tripleLift.kt │ │ ├── 8_16_sequenceFunList.kt │ │ ├── 8_17_sequenceTree.kt │ │ ├── 8_18_sequenceEither.kt │ │ ├── 8_1_functor.kt │ │ ├── 8_2_applicative.kt │ │ ├── 8_3_listApplicative.kt │ │ ├── 8_4_treeApplicative.kt │ │ ├── 8_5_treeApplicative2.kt │ │ ├── 8_6_zipApplicative.kt │ │ ├── 8_7_applicativeLawIdentify.kt │ │ ├── 8_8_applicativeLawComposition.kt │ │ └── 8_9_applicativeLawHomomorphism.kt │ ├── chapter09 │ ├── Foldable.kt │ ├── FoldableBinaryTree.kt │ ├── MaybeMonoid.kt │ ├── Monoid.kt │ ├── PracticalExamples.kt │ ├── ProductMonoid.kt │ ├── SumMonoid.kt │ ├── exercise │ │ ├── 9_10_FunListMonoidWithFoldable.kt │ │ ├── 9_11_TreeMonoidWithFoldable.kt │ │ ├── 9_12_FunListWithFoldMapContains.kt │ │ ├── 9_13_TreeWithFoldMapContains.kt │ │ ├── 9_14_FunListToBinaryTree.kt │ │ ├── 9_1_AnyMonoid.kt │ │ ├── 9_2_AllMonoid.kt │ │ ├── 9_3_AnyMonoid_MonoidLaw.kt │ │ ├── 9_4_AllMonoid_MonoidLaw.kt │ │ ├── 9_5_AnyMonoid_mconcat.kt │ │ ├── 9_6_AllMonoid_mconcat.kt │ │ ├── 9_7_FunListMonoid.kt │ │ ├── 9_8_FunListMonoid_MonoidLaw.kt │ │ └── 9_9_FunListMonoidWithConcat.kt │ └── solution │ │ ├── 9_10_FunListMonoidWithFoldable.kt │ │ ├── 9_11_TreeMonoidWithFoldable.kt │ │ ├── 9_12_FunListWithFoldMapContains.kt │ │ ├── 9_13_TreeWithFoldMapContains.kt │ │ ├── 9_14_FunListToBinaryTree.kt │ │ ├── 9_1_AnyMonoid.kt │ │ ├── 9_2_AllMonoid.kt │ │ ├── 9_3_AnyMonoid_MonoidLaw.kt │ │ ├── 9_4_AllMonoid_MonoidLaw.kt │ │ ├── 9_5_AnyMonoid_mconcat.kt │ │ ├── 9_6_AllMonoid_mconcat.kt │ │ ├── 9_7_FunListMonoid.kt │ │ ├── 9_8_FunListMonoid_MonoidLaw.kt │ │ └── 9_9_FunListMonoidWithConcat.kt │ ├── chapter10 │ ├── IOMonadExamples.kt │ ├── ListMonad.kt │ ├── MaybeMonad.kt │ ├── MaybePracticalExample1.kt │ ├── MaybePracticalExample2.kt │ ├── MaybePracticalExample3.kt │ ├── Monad.kt │ ├── MonadLaw.kt │ ├── exercise │ │ ├── 10_10_funStreamPrint.kt │ │ ├── 10_11_funStreamMonoid.kt │ │ ├── 10_12_funStreamFmap.kt │ │ ├── 10_13_funStreamPureWithApply.kt │ │ ├── 10_14_funStreamFlatMapFoldRightFlatten.kt │ │ ├── 10_15_FunTree.kt │ │ ├── 10_1_funListMonad.kt │ │ ├── 10_2_funListMonad.kt │ │ ├── 10_3_maybeChain.kt │ │ ├── 10_4_monadLaw_1.kt │ │ ├── 10_5_monadLaw_2.kt │ │ ├── 10_6_monadLaw_3.kt │ │ ├── 10_7_monadLawViaCompose.kt │ │ ├── 10_8_funStream.kt │ │ └── 10_9_funStreamOf.kt │ └── solution │ │ ├── 10_10_funStreamPrint.kt │ │ ├── 10_11_funStreamMonoid.kt │ │ ├── 10_12_funStreamFmap.kt │ │ ├── 10_13_funStreamPureWithApply.kt │ │ ├── 10_14_funStreamFlatMapFoldRightFlatten.kt │ │ ├── 10_15_FunTree.kt │ │ ├── 10_1_funListMonad.kt │ │ ├── 10_2_funListMonad.kt │ │ ├── 10_3_maybeChain.kt │ │ ├── 10_4_monadLaw_1.kt │ │ ├── 10_5_monadLaw_2.kt │ │ ├── 10_6_monadLaw_3.kt │ │ ├── 10_7_monadLawViaCompose.kt │ │ ├── 10_8_funStream.kt │ │ └── 10_9_funStreamOf.kt │ ├── chapter11 │ ├── debugging │ │ ├── ListDebuggingExample.kt │ │ └── SequenceDebuggingExample.kt │ ├── exception │ │ ├── EitherMonad.kt │ │ ├── ExceptionHandlingByEitherMonad.kt │ │ ├── ExceptionHandlingByMaybeMonad.kt │ │ ├── ExceptionHandlingByNullOrSpecificValue.kt │ │ ├── ExceptionHandlingByTryMonad.kt │ │ └── TryMonad.kt │ ├── exercise │ │ ├── 11_1_writeMonad_monadLaw.kt │ │ ├── 11_2_writeMonad_gcd.kt │ │ ├── 11_3_toMaybe.kt │ │ ├── 11_4_toEither.kt │ │ └── 11_5_getOrElse.kt │ ├── logging │ │ ├── FunctionalLogging.kt │ │ ├── ImperativeLogging.kt │ │ ├── LoggingByApplyLog.kt │ │ └── WriterMonad.kt │ ├── solution │ │ ├── 11_1_writeMonad_monadLaw.kt │ │ ├── 11_2_writeMonad_gcd.kt │ │ ├── 11_3_toMaybe.kt │ │ ├── 11_4_toEither.kt │ │ └── 11_5_getOrElse.kt │ └── testing │ │ ├── GroudRuleForTestfulCode.kt │ │ └── PropertyBasedTesting.kt │ └── common.kt └── resources └── someArticle.txt /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/README.md -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/gradle/wrapper/gradle-wrapper.properties -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/gradlew -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/gradlew.bat -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'fp-kotlin-example' -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/FirstClassFunctions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/FirstClassFunctions.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/FpCalculator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/FpCalculator.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/InfiniteValue.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/InfiniteValue.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/LazyEvaluation.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/LazyEvaluation.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/OopCalculator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/OopCalculator.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/PureFunction.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/PureFunction.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/ReferentialTransparency.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/ReferentialTransparency.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter01/SimpleCalculator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter01/SimpleCalculator.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter02/PatternMatching.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter02/PatternMatching.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter02/StandardLib.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter02/StandardLib.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter02/Variant.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter02/Variant.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter02/exercise/2-1-kotlinExtension.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter02/exercise/2-1-kotlinExtension.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter02/solution/2-1-kotlinExtension.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter02/solution/2-1-kotlinExtension.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/DynamicVsRecursion.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/DynamicVsRecursion.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/HowToMakeRecursion.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/HowToMakeRecursion.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/Memoization.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/Memoization.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/MutualRecursion.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/MutualRecursion.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/PracticalExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/PracticalExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/Recursion.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/Recursion.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/TailRecursion.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/TailRecursion.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/Trampoline.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/Trampoline.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-10-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-10-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-11-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-11-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-12-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-12-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-13-power.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-13-power.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-14-toBinary.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-14-toBinary.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-15-replicate.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-15-replicate.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-16-elem.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-16-elem.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-17-squareRoot-divideTwo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-17-squareRoot-divideTwo.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-18-squareRoot-divideTwo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-18-squareRoot-divideTwo.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-19-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-19-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-2-power.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-2-power.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-3-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-3-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-4-toBinary.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-4-toBinary.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-5-replicate.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-5-replicate.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-6-elem.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-6-elem.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-7-takeSequence.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-7-takeSequence.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-8-quicksort.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-8-quicksort.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-9-gcd.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/exercise/3-9-gcd.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-10-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-10-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-11-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-11-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-12-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-12-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-13-power.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-13-power.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-14-toBinary.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-14-toBinary.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-15-replicate.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-15-replicate.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-16-elem.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-16-elem.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-17-squareRoot-divideTwo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-17-squareRoot-divideTwo.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-18-squareRoot-divideTwo.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-18-squareRoot-divideTwo.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-19-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-19-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-2-power.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-2-power.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-3-factorial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-3-factorial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-4-toBinary.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-4-toBinary.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-5-replicate.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-5-replicate.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-6-elem.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-6-elem.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-7-takeSequence.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-7-takeSequence.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-8-quicksort.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-8-quicksort.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter03/solution/3-9-gcd.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter03/solution/3-9-gcd.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/CalculatorExample.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/CalculatorExample.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/CallbackListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/CallbackListener.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/CompositionFunctions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/CompositionFunctions.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/ConciseCodeExample.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/ConciseCodeExample.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/CurriedFunctions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/CurriedFunctions.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/HigherOrderFunctions.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/HigherOrderFunctions.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/NonCallbackListener.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/NonCallbackListener.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/PartialFunction.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/PartialFunction.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/PartiallyAppliedFunction.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/PartiallyAppliedFunction.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/PracticalExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/PracticalExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-1-invokeOrElse-orElse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-1-invokeOrElse-orElse.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-2-partial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-2-partial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-3-max.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-3-max.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-4-min.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-4-min.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-5-powerWithMax.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-5-powerWithMax.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-6-powerComposeMax.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-6-powerComposeMax.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-7-takeWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-7-takeWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-8-takeWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/exercise/4-8-takeWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-1-invokeOrElse-orElse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-1-invokeOrElse-orElse.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-2-partial.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-2-partial.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-3-max.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-3-max.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-4-min.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-4-min.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-5-powerWithMax.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-5-powerWithMax.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-6-powerComposeMax.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-6-powerComposeMax.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-7-takeWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-7-takeWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter04/solution/4-8-takeWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter04/solution/4-8-takeWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/FilterExample.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/FilterExample.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/FunList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/FunList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/FunListVsFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/FunListVsFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/FunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/FunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/ImperativeVsFunctional.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/ImperativeVsFunctional.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/Main.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/Main.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/MapExample.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/MapExample.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/PracticalExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/PracticalExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/Sum.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/Sum.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/Validator.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/Validator.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-1-intList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-1-intList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-10-filterByFoldLeft.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-10-filterByFoldLeft.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-11-reverseByFoldRight.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-11-reverseByFoldRight.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-12-filterByFoldRight.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-12-filterByFoldRight.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-13-zip.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-13-zip.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-14-associate.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-14-associate.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-15-groupBy.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-15-groupBy.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-16-test.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-16-test.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-17-sumByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-17-sumByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-18-productByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-18-productByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-19-appendTailByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-19-appendTailByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-2-doubleList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-2-doubleList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-20-filterByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-20-filterByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-21-mapByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-21-mapByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-22-takeByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-22-takeByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-23-toString.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-23-toString.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-24-squareRoot.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-24-squareRoot.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-3-getHead.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-3-getHead.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-4-drop.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-4-drop.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-5-dropWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-5-dropWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-6-take.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-6-take.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-7-takeWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-7-takeWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-8-indexedMap.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-8-indexedMap.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-9-maximumByFoldLeft.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/exercise/5-9-maximumByFoldLeft.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-1-intList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-1-intList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-10-filterByFoldLeft.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-10-filterByFoldLeft.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-11-reverseByFoldRight.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-11-reverseByFoldRight.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-12-filterByFoldRight.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-12-filterByFoldRight.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-13-zip.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-13-zip.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-14-associate.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-14-associate.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-15-groupBy.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-15-groupBy.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-16-test.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-16-test.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-17-sumByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-17-sumByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-18-productByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-18-productByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-19-appendTailByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-19-appendTailByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-2-doubleList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-2-doubleList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-20-filterByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-20-filterByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-21-mapByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-21-mapByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-22-takeByFunStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-22-takeByFunStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-23-toString.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-23-toString.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-24-squareRoot.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-24-squareRoot.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-3-getHead.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-3-getHead.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-4-drop.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-4-drop.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-5-dropWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-5-dropWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-6-take.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-6-take.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-7-takeWhile.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-7-takeWhile.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-8-indexedMap.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-8-indexedMap.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter05/solution/5-9-maximumByFoldLeft.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter05/solution/5-9-maximumByFoldLeft.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/Color.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/Color.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/Expr.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/Expr.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/Maybe.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/Maybe.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/Mixin.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/Mixin.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/PracticalExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/PracticalExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/RecursiveDataStructure.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/RecursiveDataStructure.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/TypeclassExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/TypeclassExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-1-tree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-1-tree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-2-treeInsert.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-2-treeInsert.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-3-treeInsertSOF.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-3-treeInsertSOF.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-4-treeInsertTailrec.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-4-treeInsertTailrec.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-5-contains.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/exercise/6-5-contains.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/producttype/ProductAlgebraicDataType.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/producttype/ProductAlgebraicDataType.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/solution/6-1-tree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/solution/6-1-tree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/solution/6-2-treeInsert.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/solution/6-2-treeInsert.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/solution/6-3-treeInsertSOF.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/solution/6-3-treeInsertSOF.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/solution/6-4-treeInsertTailrec.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/solution/6-4-treeInsertTailrec.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/solution/6-5-contains.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/solution/6-5-contains.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter06/sumtype/SumAlgebraicDataType.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter06/sumtype/SumAlgebraicDataType.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/Either.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/Either.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/Function.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/Function.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/Functor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/Functor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/FunctorFirstLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/FunctorFirstLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/FunctorSecondLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/FunctorSecondLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/Maybe.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/Maybe.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/PracticalExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/PracticalExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/Tree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/Tree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/WrongFunctor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/WrongFunctor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/exercise/7_1_functor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/exercise/7_1_functor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/exercise/7_2_functorLawFunList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/exercise/7_2_functorLawFunList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/solution/7_1_functor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/solution/7_1_functor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter07/solution/7_2_functorLawFunList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter07/solution/7_2_functorLawFunList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/AMaybe.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/AMaybe.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/Applicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/Applicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeAdditionalLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeAdditionalLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeCompositionLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeCompositionLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeHomomorphismLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeHomomorphismLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeIdentityLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeIdentityLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeInterchangeLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/ApplicativeInterchangeLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/EitherApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/EitherApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/LiftA2.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/LiftA2.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/MaybeApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/MaybeApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/SequenceA.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/SequenceA.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/TreeApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/TreeApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_10_applicativeLawInterchange.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_10_applicativeLawInterchange.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_11_applicativeWithFunctor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_11_applicativeWithFunctor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_12_liftAFunList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_12_liftAFunList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_13_liftTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_13_liftTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_14_liftEither.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_14_liftEither.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_15_tripleLift.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_15_tripleLift.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_16_sequenceAFunList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_16_sequenceAFunList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_17_sequenceTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_17_sequenceTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_18_sequenceEither.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_18_sequenceEither.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_1_functor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_1_functor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_2_applicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_2_applicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_3_listApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_3_listApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_4_treeApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_4_treeApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_5_treeApplicative2.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_5_treeApplicative2.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_6_zipApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_6_zipApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_7_applicativeLawIdentify.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_7_applicativeLawIdentify.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_8_applicativeLawComposition.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_8_applicativeLawComposition.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_9_applicativeLawHomomorphism.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/exercise/8_9_applicativeLawHomomorphism.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_10_applicativeLawInterchange.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_10_applicativeLawInterchange.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_11_applicativeWithFunctor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_11_applicativeWithFunctor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_12_liftAFunList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_12_liftAFunList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_13_liftTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_13_liftTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_14_liftEither.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_14_liftEither.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_15_tripleLift.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_15_tripleLift.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_16_sequenceFunList.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_16_sequenceFunList.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_17_sequenceTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_17_sequenceTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_18_sequenceEither.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_18_sequenceEither.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_1_functor.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_1_functor.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_2_applicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_2_applicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_3_listApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_3_listApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_4_treeApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_4_treeApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_5_treeApplicative2.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_5_treeApplicative2.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_6_zipApplicative.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_6_zipApplicative.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_7_applicativeLawIdentify.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_7_applicativeLawIdentify.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_8_applicativeLawComposition.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_8_applicativeLawComposition.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter08/solution/8_9_applicativeLawHomomorphism.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter08/solution/8_9_applicativeLawHomomorphism.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/Foldable.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/Foldable.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/FoldableBinaryTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/FoldableBinaryTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/MaybeMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/MaybeMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/Monoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/Monoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/PracticalExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/PracticalExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/ProductMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/ProductMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/SumMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/SumMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_10_FunListMonoidWithFoldable.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_10_FunListMonoidWithFoldable.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_11_TreeMonoidWithFoldable.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_11_TreeMonoidWithFoldable.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_12_FunListWithFoldMapContains.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_12_FunListWithFoldMapContains.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_13_TreeWithFoldMapContains.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_13_TreeWithFoldMapContains.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_14_FunListToBinaryTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_14_FunListToBinaryTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_1_AnyMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_1_AnyMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_2_AllMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_2_AllMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_3_AnyMonoid_MonoidLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_3_AnyMonoid_MonoidLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_4_AllMonoid_MonoidLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_4_AllMonoid_MonoidLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_5_AnyMonoid_mconcat.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_5_AnyMonoid_mconcat.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_6_AllMonoid_mconcat.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_6_AllMonoid_mconcat.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_7_FunListMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_7_FunListMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_8_FunListMonoid_MonoidLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_8_FunListMonoid_MonoidLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_9_FunListMonoidWithConcat.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/exercise/9_9_FunListMonoidWithConcat.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_10_FunListMonoidWithFoldable.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_10_FunListMonoidWithFoldable.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_11_TreeMonoidWithFoldable.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_11_TreeMonoidWithFoldable.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_12_FunListWithFoldMapContains.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_12_FunListWithFoldMapContains.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_13_TreeWithFoldMapContains.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_13_TreeWithFoldMapContains.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_14_FunListToBinaryTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_14_FunListToBinaryTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_1_AnyMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_1_AnyMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_2_AllMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_2_AllMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_3_AnyMonoid_MonoidLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_3_AnyMonoid_MonoidLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_4_AllMonoid_MonoidLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_4_AllMonoid_MonoidLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_5_AnyMonoid_mconcat.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_5_AnyMonoid_mconcat.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_6_AllMonoid_mconcat.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_6_AllMonoid_mconcat.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_7_FunListMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_7_FunListMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_8_FunListMonoid_MonoidLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_8_FunListMonoid_MonoidLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter09/solution/9_9_FunListMonoidWithConcat.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter09/solution/9_9_FunListMonoidWithConcat.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/IOMonadExamples.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/IOMonadExamples.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/ListMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/ListMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/MaybeMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/MaybeMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/MaybePracticalExample1.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/MaybePracticalExample1.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/MaybePracticalExample2.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/MaybePracticalExample2.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/MaybePracticalExample3.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/MaybePracticalExample3.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/Monad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/Monad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/MonadLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/MonadLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_10_funStreamPrint.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_10_funStreamPrint.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_11_funStreamMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_11_funStreamMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_12_funStreamFmap.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_12_funStreamFmap.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_13_funStreamPureWithApply.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_13_funStreamPureWithApply.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_14_funStreamFlatMapFoldRightFlatten.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_14_funStreamFlatMapFoldRightFlatten.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_15_FunTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_15_FunTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_1_funListMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_1_funListMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_2_funListMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_2_funListMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_3_maybeChain.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_3_maybeChain.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_4_monadLaw_1.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_4_monadLaw_1.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_5_monadLaw_2.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_5_monadLaw_2.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_6_monadLaw_3.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_6_monadLaw_3.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_7_monadLawViaCompose.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_7_monadLawViaCompose.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_8_funStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_8_funStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_9_funStreamOf.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/exercise/10_9_funStreamOf.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_10_funStreamPrint.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_10_funStreamPrint.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_11_funStreamMonoid.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_11_funStreamMonoid.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_12_funStreamFmap.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_12_funStreamFmap.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_13_funStreamPureWithApply.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_13_funStreamPureWithApply.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_14_funStreamFlatMapFoldRightFlatten.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_14_funStreamFlatMapFoldRightFlatten.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_15_FunTree.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_15_FunTree.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_1_funListMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_1_funListMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_2_funListMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_2_funListMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_3_maybeChain.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_3_maybeChain.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_4_monadLaw_1.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_4_monadLaw_1.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_5_monadLaw_2.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_5_monadLaw_2.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_6_monadLaw_3.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_6_monadLaw_3.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_7_monadLawViaCompose.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_7_monadLawViaCompose.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_8_funStream.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_8_funStream.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter10/solution/10_9_funStreamOf.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter10/solution/10_9_funStreamOf.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/debugging/ListDebuggingExample.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/debugging/ListDebuggingExample.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/debugging/SequenceDebuggingExample.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/debugging/SequenceDebuggingExample.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exception/EitherMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exception/EitherMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByEitherMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByEitherMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByMaybeMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByMaybeMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByNullOrSpecificValue.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByNullOrSpecificValue.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByTryMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exception/ExceptionHandlingByTryMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exception/TryMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exception/TryMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_1_writeMonad_monadLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_1_writeMonad_monadLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_2_writeMonad_gcd.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_2_writeMonad_gcd.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_3_toMaybe.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_3_toMaybe.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_4_toEither.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_4_toEither.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_5_getOrElse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/exercise/11_5_getOrElse.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/logging/FunctionalLogging.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/logging/FunctionalLogging.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/logging/ImperativeLogging.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/logging/ImperativeLogging.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/logging/LoggingByApplyLog.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/logging/LoggingByApplyLog.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/logging/WriterMonad.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/logging/WriterMonad.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/solution/11_1_writeMonad_monadLaw.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/solution/11_1_writeMonad_monadLaw.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/solution/11_2_writeMonad_gcd.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/solution/11_2_writeMonad_gcd.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/solution/11_3_toMaybe.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/solution/11_3_toMaybe.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/solution/11_4_toEither.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/solution/11_4_toEither.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/solution/11_5_getOrElse.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/solution/11_5_getOrElse.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/testing/GroudRuleForTestfulCode.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/testing/GroudRuleForTestfulCode.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/chapter11/testing/PropertyBasedTesting.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/chapter11/testing/PropertyBasedTesting.kt -------------------------------------------------------------------------------- /src/main/kotlin/fp/kotlin/example/common.kt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/kotlin/fp/kotlin/example/common.kt -------------------------------------------------------------------------------- /src/main/resources/someArticle.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/funfunStory/fp-kotlin-example/HEAD/src/main/resources/someArticle.txt --------------------------------------------------------------------------------