[cli] Program handle actions list in stack safe manner (#93)
This commit is contained in:
parent
c23376a037
commit
0fa8382fa3
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ trait Program {
|
||||||
|
|
||||||
private def handleActions(archive: ThorpArchive,
|
private def handleActions(archive: ThorpArchive,
|
||||||
actions: Stream[Action]): IO[Stream[StorageQueueEvent]] =
|
actions: Stream[Action]): IO[Stream[StorageQueueEvent]] =
|
||||||
actions.foldRight(Stream[IO[StorageQueueEvent]]()) {
|
actions.foldLeft(Stream[IO[StorageQueueEvent]]()) {
|
||||||
(action, stream) => archive.update(action) ++ stream
|
(stream, action) => archive.update(action) ++ stream
|
||||||
}.sequence
|
}.sequence
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue