Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

spread and spread'

  • Loading branch information...
commit 0204b8b968054bcf712ea1d94c4aa043793f40cd 1 parent a5aca3c
@yaxu authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 Strategies.hs
View
8 Strategies.hs
@@ -20,7 +20,9 @@ brak = every 2 (((1%4) <~) . (\x -> cat [x, silence]))
-- samples "jvbass [~ latibro] [jvbass [latibro jvbass]]" ((1%2) <~ slow 6 "[1 6 8 7 3]")
samples p p' = sample <$> p <*> p'
+spread f xs p = cat $ map (\x -> f x p) xs
-
-
-
+spread' :: (a -> Sequence b -> Sequence c) -> Sequence a -> Sequence b -> Sequence c
+spread' f timepat pat =
+ Sequence $ \r -> concatMap (\(r', x) -> (range (f x pat) r')) (rs r)
+ where rs r = mapFsts (mapSnd Just) $ range (filterOffsets timepat) r
Please sign in to comment.
Something went wrong with that request. Please try again.