Commit Graph

174 Commits

Author SHA1 Message Date
Michael Bull b5aab62af4 Add Result.recover
Similar to getOrElse but returns an Ok of the transformed error
2018-11-01 11:42:09 +00:00
Michael Bull 3a3b5415a7 Return the Result in on{Success,Failure}
This facilitates chaining onSuccess/onFailure calls that may perform
arbitrary side-effects, such as logging.
2018-11-01 11:25:20 +00:00
Michael Bull 4eb5d80f91 Add fold as an alias to mapBoth 2018-11-01 11:17:40 +00:00
Michael Bull 7e45bfb7f2 Update Kotlin to 1.3.0 2018-11-01 11:03:47 +00:00
Michael Bull 722ddd7c1f Remove jdk dependency of kotlin stdlib 2018-09-24 23:24:29 +01:00
Michael Bull c9811cca6e Update Kotlin & Gradle 2018-09-24 22:34:12 +01:00
Michael Bull 8c35de90ae Simplify javadocJar dependency on dokka task 2018-09-24 22:32:47 +01:00
Michael Bull 436d0990cb Use kotlin short-form for dependency declarations 2018-09-24 22:31:53 +01:00
Michael Bull 80bd9dd692 Migrate to Kotlin Gradle DSL 2018-09-24 22:13:47 +01:00
Michael Bull b93dd4457c Consistently use Gradle plugins DSL 2018-09-24 00:26:29 +01:00
Michael Bull 08c1fb8173 Fix whitespace in README example 2018-09-19 00:13:59 +01:00
Michael Bull c6c029cc20 [Gradle Release Plugin] - new version commit: '1.1.1-SNAPSHOT'. 2018-09-19 00:07:39 +01:00
Michael Bull ab1e665b5e [Gradle Release Plugin] - pre tag commit: '1.1.0'. 2018-09-19 00:07:25 +01:00
Michael Bull f10de37b08 Migrate away from multi-platform project structure 2018-09-19 00:05:03 +01:00
Michael Bull 88f496a366 Add explicit dependencies to bintrayUpload task 2018-09-18 22:48:32 +01:00
Michael Bull 4a0a49be90 Add bintray publishing configuration 2018-09-18 22:21:28 +01:00
Michael Bull 21db2e5e4f Mark new mapping functions as inline 2018-09-18 20:16:17 +01:00
Michael Bull 1377350895 Consistently wrap documentation at 100 characters 2018-09-18 20:00:50 +01:00
Michael Bull 29e21e57a0 Avoid creating unnecessary Err elements in map functions 2018-09-18 19:48:23 +01:00
Michael Bull e43a7008d8 Add more mapping functions for Iterables
- mapAll
- mapResult
- mapResultTo
- mapResultNotNull
- mapResultNotNullTo
- mapResultIndexed
- mapResultIndexedTo
- mapResultIndexedNotNull
- mapResultIndexedNotNullTo
2018-09-18 19:40:07 +01:00
Michael Bull cc1ab4940d Update dependencies 2018-09-18 18:26:45 +01:00
Michael Bull 916760ac6d Update dependencies 2018-08-09 15:27:18 +01:00
Michael Bull d7f09ec6d7 Update links to elm-result-extra 2018-08-09 15:09:15 +01:00
Michael Bull b9bf8f1eaf Update kotlin to 1.2.40 2018-04-22 23:29:32 +01:00
Michael Bull 6c0a24b019 Update README 2018-02-28 04:10:51 +00:00
Michael Bull 909462be86 Align artifact group with jitpack repository
Jitpack convention sets the artifact id as
com.github.michaelbull:kotlin-result, excluding "kotlin-result" from the
group name. This commit aligns the artifact's group name with their
convention.
2018-02-28 03:18:34 +00:00
Michael Bull b812d938f9 Place generated docs in docs/javadoc
This matches the default behaviour of the javadoc task. See:
https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html#org.gradle.api.tasks.javadoc.Javadoc:destinationDir
2018-02-28 03:15:24 +00:00
Michael Bull 667287f7d3 Update LICENSE 2018-02-28 02:17:37 +00:00
Michael Bull 2db3e0e3cf Move release plugin to new plugin dsl 2018-02-28 01:47:00 +00:00
Michael Bull 184b5f6dd8 [Gradle Release Plugin] - new version commit: '1.0.9-SNAPSHOT'. 2018-01-24 18:24:21 +00:00
Michael Bull 9ceff8ce1c [Gradle Release Plugin] - pre tag commit: '1.0.8'. 2018-01-24 18:24:09 +00:00
Michael Bull a2aab06e91 Update version in README 2018-01-24 18:23:29 +00:00
Michael Bull d35e7e9c51 Update kotlin 2018-01-24 18:22:11 +00:00
Michael Bull 410563b621 Add toResultOr
Acts as a factory function to convert nullable types to Result types
2018-01-24 18:20:39 +00:00
Michael Bull c93ac7fb18 Correct link in README 2018-01-24 13:24:56 +00:00
Michael Bull 87942dd769 Simplify example section in README 2018-01-24 13:23:47 +00:00
Michael Bull abf3716a71 Add example section to README 2018-01-24 13:21:01 +00:00
Michael Bull 9d7c5f07f7 Lift DomainMessage subtypes to top-level declarations in example 2018-01-24 13:03:48 +00:00
Michael Bull 687c4c9d7f Omit "this" prefix from method references
https://kotlinlang.org/docs/reference/whatsnew12.html#support-for--foo-as-a-shorthand-for-thisfoo
2018-01-24 12:58:26 +00:00
Michael Bull 631f81d8ae Fix mis-ordered modifier keywords
https://kotlinlang.org/docs/reference/coding-conventions.html#modifiers
2018-01-19 14:21:32 +00:00
Michael Bull de239962da Update dependencies 2018-01-17 18:29:33 +00:00
Michael Bull b42a1b11db [Gradle Release Plugin] - new version commit: '1.0.8-SNAPSHOT'. 2018-01-11 20:50:26 +00:00
Michael Bull 4d3030ebdc [Gradle Release Plugin] - pre tag commit: '1.0.7'. 2018-01-11 20:50:17 +00:00
Michael Bull 5ddae8ca11 Update README 2018-01-11 20:25:59 +00:00
Michael Bull e8581976c3 Split up CustomerService.upsert in example app 2018-01-11 19:27:27 +00:00
Michael Bull d2723009df Simplify endpoints in example app 2018-01-11 19:27:07 +00:00
Michael Bull 76870ef78a Catch Exception instead of Throwable in Result.of 2018-01-11 18:31:10 +00:00
Michael Bull cfaa57dd1f Add example application 2018-01-11 18:30:41 +00:00
Michael Bull 389a87ffe2 Simplify editorconfig 2018-01-11 18:29:29 +00:00
Michael Bull c2fc72d0cb Add zip functions 2018-01-11 18:28:31 +00:00