dh44t
01/16/2018, 10:03 AMdh44t
01/16/2018, 10:03 AMvalue
is kind of genericdh44t
01/16/2018, 10:03 AMdh44t
01/16/2018, 10:05 AMvalue
with extension propertiesraulraja
01/16/2018, 10:06 AMraulraja
01/16/2018, 10:10 AMraulraja
01/16/2018, 8:18 PMheyitsmohit
01/16/2018, 8:31 PMIO.runAsync { ... }
vs
IO.AsyncContext.runAsync { ... }
raulraja
01/16/2018, 8:35 PMIO.runAsync { cb -> ... }
is used take an async calback based API and use it to lift the result of the async computation whether is a succesful result or an exception into the context of IO
raulraja
01/16/2018, 8:36 PMAsyncContext
which is the type class version describing the behavior of what runAsync
does,raulraja
01/16/2018, 8:38 PMraulraja
01/16/2018, 8:39 PMrunAsync
unless you are integrating callbacks into your composition of IO or whatever other async data type such as DeferredKW or ObservableKWhelpermethod
01/17/2018, 10:09 AMdh44t
01/17/2018, 10:10 AMdh44t
01/17/2018, 10:10 AMdh44t
01/17/2018, 10:11 AMraulraja
01/17/2018, 10:20 AMhelpermethod
01/17/2018, 10:23 AMhelpermethod
01/17/2018, 10:23 AMdh44t
01/17/2018, 10:26 AMpartially
and andThen
have just package changesdh44t
01/17/2018, 10:26 AMeitherTry
should be now Try {/*BOOM!!*/}.toEither()
dh44t
01/17/2018, 10:27 AMeitherTry
but is deprecatedhastebrot
01/17/2018, 12:40 PMpartially1
, … are in the arrow.syntax.function
package. Somehow the GitHub code search function could only find the tests for it.helpermethod
01/17/2018, 1:48 PMr4zzz4k
01/17/2018, 1:52 PMdh44t
01/17/2018, 2:02 PMraulraja
01/17/2018, 2:31 PMArrow
to do that please run first ./gradlew clean build
the first time because some of the types depend on boilerplate codegen and just opening the project in IDEA won't yield the results you want either.mkobit
01/18/2018, 2:07 AMList<Action>
, where each Action
is a function that is like this signature
interface Action {
fun apply(text: String): Pair<String, Boolean>
}
where the output is the new String
with modifications and true
if it was modified or original String
and the false
if it was not modified. i just need to know if any of the Action
produced a new result
the input to the first action is text of a file
i want to chain the output of each function together, for example so if i have 3 `Action`s the String
flows through each of them.
i was looking at http://arrow-kt.io/docs/datatypes/state/ which seems like what i should be using (like using State<String, Boolean>
), but im stumbling on some of the implementation pieces, like wrapping and unwrapping the types at the boundaries and chaining the arbitrary N
methods together
what is the right approach here, and anybody have some advice for getting started?dh44t
01/18/2018, 9:41 AM