[MLton] A Vector/Fold challenge

skaller skaller@users.sourceforge.net
Sat, 06 May 2006 10:49:20 +1000


On Fri, 2006-05-05 at 11:47 -0400, Matthew Fluet wrote:
> This has been itching me for a few weeks, and while I'm certain I would 
> learn more by doing it myself, it will probably come pretty easy to the 
> master Fold-ers.
> 
> Essentially, I'd like a generalization of Vector.map so that I can map N 
> vectors to M vectors via an N-ary product to M-ary product function. 
> (Probably, it' makes more sense to start with a generalization of 
> Vector.fold, but I seem to recall wanting MtoN maps more often than M 
> folds in the compiler.)

You could look at Barry Jay's FISh 1 array processing language.
It provides array polyadic programming. That is, map and fold
and HOF's in general work with arrays of any rank.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net