我試圖圍繞enumerator
庫包裹我的頭,並遇到了一種情況,我想根據兩個現有的枚舉構建一個新的Enumeratee。比方說,我有enumeratees:合併兩個枚舉
e1 :: Enumeratee x y m b
e2 :: Enumeratee y z m b
我覺得我應該能夠將它們組合成一個enumeratee
e3 :: Enumeratee x z m b
,但我無法找到一個現有的功能在包中做到這一點。我試圖自己編寫這樣一個函數,但是我對iteratees的理解仍然非常有限,以至於我無法找到讓所有複雜類型匹配的方法。
難道我只是想念一些基本的combinator,或者Enumeratees甚至應該是可以相互組合嗎?