Skip to content

Commit

Permalink
s_when -> s_while
Browse files Browse the repository at this point in the history
  • Loading branch information
yaxu committed Apr 15, 2024
1 parent 8492584 commit 00b079a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Sound/Tidal/Stepwise.hs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ _s_sub r pat@(Pattern _ (Just t) _) | r >= t = nothing
s_sub :: Pattern Rational -> Pattern a -> Pattern a
s_sub = patternify _s_sub

s_when :: Pattern Bool -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
s_when patb f pat@(Pattern _ (Just t) _) = while (_steps t patb) f pat
s_while :: Pattern Bool -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
s_while patb f pat@(Pattern _ (Just t) _) = while (_steps t patb) f pat
-- TODO raise exception?
s_when _ _ pat = pat
s_while _ _ pat = pat

_s_nth :: Bool -> Bool -> Int -> (Pattern a -> Pattern a) -> Pattern a -> Pattern a
_s_nth lastone stepwise n f pat
Expand Down

0 comments on commit 00b079a

Please sign in to comment.