Sound.SC3.Lang.Pattern.Step

Synopsis

# Documentation

data P s a Source

Constructors

 Empty Value a RP (s -> (P s a, s)) Append (P s a) (P s a) forall x . Unfoldr (x -> Maybe (a, x)) x forall x . Continue (P s x) (x -> P s x -> P s a) forall x . Apply (P s (x -> a)) (P s x) forall x y . Scan (x -> y -> (x, a)) (Maybe (x -> a)) x (P s y)

Instances

 Monad (P s) Functor (P a) MonadPlus (P s) Applicative (P s) Alternative (P s) Eq a => Eq (P s a) Fractional a => Fractional (P s a) Num a => Num (P s a) Show a => Show (P s a) Monoid (P s a)

data Result s a Source

Constructors

 Result s a (P s a) Done s

step :: s -> P s a -> Result s aSource

runP :: Monad m => s -> ((a, s) -> m s) -> (b -> a -> b) -> b -> P s a -> m bSource

pfoldr' :: s -> (a -> b -> b) -> b -> P s a -> bSource

evalP :: P () a -> [a]Source

evalR :: String -> P StdGen a -> [a]Source

pzipWith :: (a -> b -> c) -> P s a -> P s b -> P s cSource

Apply `f` pointwise to elements of `p` and `q`.

pcycle :: P s a -> P s aSource

prepeat :: a -> P s aSource

# Basic constructors

prp :: (s -> (P s a, s)) -> P s aSource

pcontinue :: P s x -> (x -> P s x -> P s a) -> P s aSource

pscan :: (x -> y -> (x, a)) -> Maybe (x -> a) -> x -> P s y -> P s aSource

punfoldr :: (x -> Maybe (a, x)) -> x -> P s aSource

# Control

pfilter :: (a -> Bool) -> P s a -> P s aSource

plist :: [P s a] -> P s aSource

pcons :: a -> P s a -> P s aSource

preplicate_ :: Int -> P s a -> P s aSource

preplicate :: P s Int -> P s a -> P s aSource

pn :: P s a -> P s Int -> P s aSource

pn_ :: P s a -> Int -> P s aSource

ptake_ :: Int -> P s a -> P s aSource

`n` initial values at `p`.

ptake :: P s Int -> P s a -> P s aSource

prestrict_ :: Int -> P s a -> P s aSource

`n` initial values at pcycle of `p`.

prestrict :: P s Int -> P s a -> P s aSource

pmapMaybe :: (a -> Maybe b) -> P s a -> P s bSource

preject :: (a -> Bool) -> P s a -> P s aSource

pzipWith3 :: (a -> b -> c -> d) -> P s a -> P s b -> P s c -> P s dSource

pzipWith4 :: (a -> b -> c -> d -> e) -> P s a -> P s b -> P s c -> P s d -> P s eSource

pzip :: P s a -> P s b -> P s (a, b)Source

pzip3 :: P s a -> P s b -> P s c -> P s (a, b, c)Source

pzip4 :: P s a -> P s b -> P s c -> P s d -> P s (a, b, c, d)Source

pseries :: Num a => a -> a -> Int -> P s aSource

pgeom :: Num a => a -> a -> Int -> P s aSource

pstutter' :: P s Int -> P s a -> P s aSource

pstutter :: P s Int -> P s a -> P s aSource

pcountpre :: P s Bool -> P s IntSource

Count false values preceding each true value.

Count false values following each true value.

pclutch' :: P s a -> P s Bool -> P s aSource

pbool :: (Ord a, Num a) => P s a -> P s BoolSource

pclutch :: (Num b, Ord b) => P s a -> P s b -> P s aSource

pcollect :: (a -> b) -> P s a -> P s bSource

pdegreeToKey :: RealFrac a => P s a -> P s [a] -> P s a -> P s aSource

pfin :: P s Int -> P s a -> P s aSource

pfin_ :: Int -> P s a -> P s aSource

wrap :: (Ord a, Num a) => a -> a -> a -> aSource

pwrap :: (Ord a, Num a) => P s a -> P s a -> P s a -> P s aSource

prsd :: Eq a => P s a -> P s aSource

Remove successive duplicates.

psequence :: P s (P s a) -> P s aSource

pduple :: (a, a) -> P s aSource

pinterleave :: P s a -> P s a -> P s aSource

ptrigger :: P s Bool -> P s a -> P s (Maybe a)Source

pif :: P s Bool -> P s a -> P s a -> P s aSource

phead :: P s a -> P s aSource

ptail :: P s a -> P s aSource

pdrop :: P s Int -> P s a -> P s aSource

pscanl :: (a -> y -> a) -> a -> P s y -> P s aSource

# Random numbers

prrandf :: (RandomGen s, Random a) => (a -> a -> a -> a) -> a -> a -> P s aSource

prrand :: (RandomGen s, Random a) => a -> a -> P s aSource

prrandexp :: (RandomGen s, Floating a, Random a) => a -> a -> P s aSource

pchoosea :: RandomGen s => Array Int (P s a) -> P s aSource

pchoose :: RandomGen s => [P s a] -> P s aSource

prand :: RandomGen s => [P s a] -> P s Int -> P s aSource

pwhite :: (RandomGen s, Random a) => P s a -> P s a -> P s Int -> P s aSource

pexprand :: (RandomGen s, Floating a, Random a) => P s a -> P s a -> P s Int -> P s aSource

pxrand :: (RandomGen s, Eq a) => [P s a] -> P s Int -> P s aSource

pwrand :: RandomGen s => [P s a] -> [P s a] -> P s Int -> P s aSource

# List

pseq_ :: [P s a] -> Int -> P s aSource

pseq :: [P s a] -> P s Int -> P s aSource

pser_ :: [P s a] -> Int -> P s aSource

`n` values from the infinite cycle of the streams at l.

pser :: [P s a] -> P s Int -> P s aSource

pswitch :: [P s a] -> P s Int -> P s aSource

pswitch1m :: IntMap (P s a) -> P s Int -> P s aSource

pswitch1 :: [P s a] -> P s Int -> P s aSource

ppatlace :: [P s a] -> P s Int -> P s aSource

# Extend

pzipWith_c :: (a -> b -> c) -> P s a -> P s b -> P s cSource

(+.) :: Num a => P s a -> P s a -> P s aSource

(*.) :: Num a => P s a -> P s a -> P s aSource

(/.) :: Fractional a => P s a -> P s a -> P s aSource

(-.) :: Num a => P s a -> P s a -> P s aSource