You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the list of up to `n` last elements from this source. Less than
`n` elements is returned when this source contains les elements than requested.
The [[List.empty]] is returned when `takeLast` is called on an empty source.
Example:
Source.empty[Int].takeLast(5) // List.empty
Source.fromValues(1).takeLast(0) // List.empty
Source.fromValues(1).takeLast(2) // List(1)
val s = Source.fromValues(1, 2, 3, 4)
s.takeLast(2) // List(4, 5)
s.receive() // ChannelClosed.Done
0 commit comments