Yes. I see that I was less clear in my original message than I could have been. 
The slow/fast function isn't really relevant. Allow me to start over :)

I have a function:

processBlock :: BlockState -> Block -> BlockState

which folds a Block into a BlockState which has been accumulated from Blocks 
previous to the Block in question.

As such, this function only allows sequential operation on a list/stream of 
blocks.

I also have a function which combines two BlockStates into one:

consolidateBlockState :: BlockState -> BlockState -> BlockState

where the first BlockState is accumulated from Blocks prior to the Blocks from 
which the latter BlockState is made of.

This allows me to turn the otherwise sequential operation into a parallel one. 
I just can't figure out how to get "par" and "pseq" working inside a Pipe, in 
order to fold multiple sets of Blocks into BlockStates in parallel (on multiple 
CPU cores).


/Rune


> On 07 Nov 2015, at 19:49, Michael Thompson <practical.wis...@gmail.com> wrote:
> 
> 
> Right, I think I misunderstood the original message as saying that there was 
> a slow function
> 
>      Block -> BlockState
> 
> and that one could fold the BlockStates up monoidally. But I guess the slow 
> function is
> 
>     BlockState -> Block -> BlockState
> 
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Haskell Pipes" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/haskell-pipes/FItX8aZ588g/unsubscribe 
> <https://groups.google.com/d/topic/haskell-pipes/FItX8aZ588g/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> haskell-pipes+unsubscr...@googlegroups.com 
> <mailto:haskell-pipes+unsubscr...@googlegroups.com>.
> To post to this group, send email to haskell-pipes@googlegroups.com 
> <mailto:haskell-pipes@googlegroups.com>.

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haskell-pipes+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-pipes@googlegroups.com.

Reply via email to