Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function switchCombine<a>(
streams$: Stream>>): Stream>
{
return switchLatest(
map(
(streams) => streams.length === 0 ?
just([]) :
combineArray(Array, streams as Array>),
streams$,
),
)
}
</a>
export function switchMerge<a>(
streams$: Stream>>): Stream>
{
return switchLatest>(
map(
(streams) => streams.length === 0 ? just([]) : mergeArray(streams),
streams$,
),
)
}
</a>