Is there already a function to sequentially apply functions to a pattern?

I wonder if there is already a function like layer but with cat instead of stack? I searched for a function like this:

dispersion :: [a -> Pattern b] -> a -> Pattern b
dispersion fs p = cat $ map ($ p) fs

But I don't know whether this function already exists and whether it's undocumented?


drawLine (dispersion [fast 2, rev, id] $ "[1 2 3]")
-- |123123|321|123|123123|321|123|
1 Like

not sure, if that's what you're going for: fix - TidalCycles userbase

EDIT: Ah no, now I get your idea. sorry - that's not the one then.

Maybe spread?

1 Like

No problemo but thanks for the answer :slightly_smiling_face:

Ah nice, thx. This is exactly the function I was looking for!