Ensuring Minimum Value Output in Stream Pagination
Since I've seen there's a concept of non empty chunks and
I'm writing some pagination API and I always have at least 1 item back when using
Stream.paginate* should always produce at least 1 item (errors aside), is there a way to have at the type level the info that such stream will always produce at least N value (in this case 1) ?I'm writing some pagination API and I always have at least 1 item back when using
Stream.paginateEffect with Stream.runCollect but I need to Chunk.head/last and then use Option to grab the value and put a default value for the orElse branch which will never happen.