1
Stream上的內置壓縮函數顯示爲在輸入流對中最短的一個截斷。我怎樣才能實現這個功能:將壓縮流投影到最長的流
def firstOrLongest[T](a : Stream[ T ], b : Stream[ T) : Stream[ T ]
// resulting stream should have the property that:
// while there are still elements of a, return (the corresponding element of) a
// else return (the corresponding element of) b.
見的答案我的問題[這裏](http://stackoverflow.com/q/3015962/334519 )針對Haskell中類似問題的一些解決方案。 –