Most discussion is on Typelevel Discord: https://discord.gg/bSQBZA3Ced
Traverse
like other Collection classes? Say I have the same situation in https://stackoverflow.com/questions/53806418/chaining-a-number-of-transitions-with-the-state-monad
traverse
, so the answer does not work in my situation
IO
monad can't because it represents a non-referentially transparent computation
evalMap
and others, but the "leave stream" part needs to go through the .compile
step
Stream
for F=Pure
could have such an instance
F
couldn't
StateT
, but there is nothing wrong with doing what you're doing at first, so definitely keep exploring :)
compile.list
:P
Nothing
for a method impl satisfies the contract or not
evalMap
is... Any advice?
F[_]
, then evaluates the F
to get the element back
pure
so it might be easier to skip the T
and just use State
Stream.eval(first) ++ Stream.eval(second) ++ Stream.eval(third)
but then why are you using Stream
? Could just have first >> second >> third
evalMap(identity)
btw (rather than pure
)
Int => StateT
that takes an Int
and inc/decr by that int
Stream(1, -1, 2, 1, -1).evalMap(yourFunction)
and see
List.fill(5)(yourStateT).sequence
becomes Stream.repeatEval(yourStateT).take(5)
Stream.eval(yourStateT).repeat.take(5)
runS
over and over again