WaveBeans / wavebeans

Audio Processing. On scale.
https://wavebeans.io
Apache License 2.0
24 stars 0 forks source link

Custom map function support #16

Closed asubb closed 4 years ago

asubb commented 4 years ago

Sometimes it is required to convert one stream to another using custom functions. For example might be valuable to convert Sample -> Window<Sample> or backwards.

The potential API is:

Stream<Sample>().map<Window<Sample>> { Window(elements = repeat(10) { it }) }
Stream<Window<Sample>>().map<Sample> { it.elements.sum() / it.elements.count() }