
20 Apr
2009
20 Apr
'09
7:48 a.m.
On Apr 18, 2009, at 2:48 AM, Sjoerd Visscher wrote:
using Matt Hellige's pointless fun http://matt.immute.net/content/pointless-fun
diag = foldr1 (zipWith (++) $. id ~> ([]:) ~> id) $. map (++ repeat []) ~> takeWhile (not.null) $. (map.map) (:[]) ~> concat
pretty! Those seem to be exactly the combinators that I was looking for. Unfortunately, I still don't manage to mimic my version that uses functional lists and continuations (but no ++) mainly because I'm lacking an equivalent of the second line of the above solution which allows for the simpler 'zipWith (++)' instead of the merge function. Anyway, once you know what they mean, Matt's combinators are quite useful. Thanks for pointing that out! Cheers, Sebastian