kotlin-result

A multiplatform Result monad for modelling success or failure operations.

ISC License

Stars
1K

Bot releases are hidden (Show)

kotlin-result - 1.1.2

Published by michaelbull about 5 years ago

  • Add compiler contracts (66f1122efb689172ed53d36a72f6586aeab998f5)
kotlin-result -

Published by michaelbull almost 6 years ago

  • Migrate to Kotlin Gradle DSL(80bd9dd69221ddec35cd81607ecacaa9cb28c96c)
  • Remove jdk dependency of kotlin stdlib (722ddd7c1fa353a13ba76e65cbdfb03796e88b70)
  • Update Kotlin to 1.3.0 (7e45bfb7f2d47cf43f2b1dd91e80979d144dc588)
  • Add fold as an alias to mapBoth (4eb5d80f9115578c63ce8360c240caaea2897e0c)
  • Return the Result in on{Success,Failure} (3a3b5415a748ad75bc133097e9d7b7cfd0d73cb8)
    • This facilitates chaining onSuccess/onFailure calls that may perform arbitrary side-effects, such as logging.
  • Add Result.recover (b5aab62af4f74a9a642f53a3c8f27bd47501bc32)
    • Similar to getOrElse but returns an Ok of the transformed error
kotlin-result -

Published by michaelbull about 6 years ago

Now published on Bintray

repositories {
    maven { url = 'https://dl.bintray.com/michaelbull/maven' }
}

dependencies {
    compile 'com.michael-bull.kotlin-result:kotlin-result:1.1.0'
}
  • Update dependencies (cc1ab4940d63b73cc71b42ee3c2141f101c51513)
  • Add more mapping functions for Iterables (e43a7008d85284d2ce0342d9ed9b3681598b1a0a)
    • mapAll
    • mapResult
    • mapResultTo
    • mapResultNotNull
    • mapResultNotNullTo
    • mapResultIndexed
    • mapResultIndexedTo
    • mapResultIndexedNotNull
    • mapResultIndexedNotNullTo
  • Avoid creating unnecessary Err elements in map functions (29e21e57a0fc61c9a777b864694e838e89351bf4)
  • Consistently wrap documentation at 100 characters(1377350895c7a7e45a042308be39dc48feb368da)
  • Mark new mapping functions as inline (21db2e5e4f203f82bdb306eedf02283edd50237a)
  • Add bintray publishing configuration (4a0a49be904820f49f4124ea651337ee92b1ac0b)
  • Add explicit dependencies to bintrayUpload task (88f496a3664426a0eb853b2f52c6bfa2e4a2fe4a)
  • Migrate away from multi-platform project structure (f10de37b08a631f6d6d3ed102702e21066233666)
kotlin-result -

Published by michaelbull over 6 years ago

  • Fix mis-ordered modifier keywords (631f81d8ae6d2c42069a0f6ee8453cd707f0cf76)
  • Add toResultOr (410563b621d3e18860b1be92a07af9338d9274e1)
    • Acts as a factory function for converting nullable types to Results. An example is shown in the README.
kotlin-result -

Published by michaelbull almost 7 years ago

  • Add zip functions (c2fc72d0cbc4ba62585bf2eff064fde010dceb6f)
  • Catch Exception instead of Throwable in Result.of (76870ef78a1fd7086d62a145d8e0834d0029d125)
kotlin-result -

Published by michaelbull almost 7 years ago

  • Add lazy variants for {and,or,getOr,getErrorOr} (c6be93142d157acb1db155a393782ed912613a73)
  • Simplify doc comments according to Kotlin Coding Conventions (c5a11a914e730004f63f6e5f7a0ccbad57a054fe)
kotlin-result -

Published by michaelbull almost 7 years ago

  • Alias flatMap function to andThen (44a4467595a0ade41a47bdfffe7f934eded0a2d9)
  • Improve javadoc (b2d29d62b7f86adf9c1a5ca8055b3e5aaa4e41e4)
kotlin-result -

Published by michaelbull almost 7 years ago

  • Mark on{Success,Failure} as infix (3e3b649193e58fb0707724fe260bcf38db54329a)
  • Inline the onSuccess() and onFailure() functions (47fa20ca34edfef10eeafb1861e9af04e6e56224)
kotlin-result -

Published by michaelbull almost 7 years ago

  • Downgrade dokka (7b5ffefa8fb59f830ea02f1beea5807a5950a2cf)
  • Add multi-platform support (9ddac98e0c4d792536ed617cc586ffd9d04d1f41)
  • Update kotlin to 1.2.10 (416c0950b220365bb01279041bfad0d8cc7479da)
  • Update Gradle to 4.4 (64213f4b0496d561be8d6a9ae5a8432c560c3f95)
kotlin-result -

Published by michaelbull almost 7 years ago

  • Upgrade Kotlin to 1.2.0 (8e3597322afdb2a8301d530f69c51f2d13dd523b)
  • Upgrade Gradle wrapper to (7c8fca30539aa77bf7b53600c86440cb54bd2fc6)
  • Make lambda return type of expect{Err} return Any (e455be2cc80b571aebf39079696a49a89bce8ad4)
kotlin-result -

Published by michaelbull almost 7 years ago

  • Add lazily evaluation to expect/expectError & deprecated older versions (ad7adacf395d62c8931fcf6f8dfb36bf0e94c9d1)
  • Add getErrorOrElse (5d5195af9deddf0bfd131aa3e0ad38766ce5544d)
kotlin-result -

Published by michaelbull almost 7 years ago

  • Initial release