[Haskell-cafe] Re: howto tuple fold to do n-ary cross product?
Luke Palmer
lrpalmer at gmail.com
Sun Nov 30 16:11:39 EST 2008
On Sun, Nov 30, 2008 at 2:07 PM, Martijn van Steenbergen
<martijn at van.steenbergen.nl> wrote:
> Larry Evans wrote:
>>
>> The haskell code:
>>
>> cross::[[a]]->[[a]]
>>
>> calculate a cross product of values.
>
> Now if you allow the elements of that function's argument list to be
> possibly infinite lists and you still want to eventually yield every
> possible cross product, you get a very nice problem...
Solved by control-monad-omega (not really a monad).
The other nice one problem is allowing the argument itself to be
infinite (you have to require all of the lists to be nonempty).
Luke
More information about the Haskell-Cafe
mailing list