hsc3-0.15.1: Haskell SuperCollider

Safe HaskellSafe-Inferred
LanguageHaskell98

Sound.SC3.Common

Contents

Synopsis

Documentation

reads_exact :: Read a => String -> Maybe a Source

Variant of reads requiring exact match.

STRING / CASE

data Case_Rule Source

CI = Case insensitive, CS = case sensitive.

Constructors

CI 
CS 

Instances

is_ci :: Case_Rule -> Bool Source

Predicates for Case_Rule.

is_cs :: Case_Rule -> Bool Source

Predicates for Case_Rule.

string_eq :: Case_Rule -> String -> String -> Bool Source

String equality with Case_Rule.

string_eq CI "lower" "LOWER" == True

parse_enum :: (Show t, Enum t, Bounded t) => Case_Rule -> String -> Maybe t Source

Enum parser with Case_Rule.

parse_enum CI "FALSE" == Just False

LIST

lookup_by :: (a -> a -> Bool) -> a -> [(a, b)] -> Maybe b Source

lookup with equality function.

rlookup_by :: (b -> b -> Bool) -> b -> [(a, b)] -> Maybe a Source

Reverse lookup with equality function.

pcn_triples :: [a] -> [(Maybe a, a, Maybe a)] Source

(prev,cur,next) triples.

pcn_triples [1..3] == [(Nothing,1,Just 2),(Just 1,2,Just 3),(Just 2,3,Nothing)]

TUPLES

type T2 a = (a, a) Source

type T3 a = (a, a, a) Source

type T4 a = (a, a, a, a) Source

mk_duples :: (a -> c) -> (b -> c) -> [(a, b)] -> [c] Source

concatMap of f at x and g at y.

mk_duples_l :: (Int -> c) -> (a -> c) -> (b -> c) -> [(a, [b])] -> [c] Source

Length prefixed list variant of mk_duples.

mk_triples :: (a -> d) -> (b -> d) -> (c -> d) -> [(a, b, c)] -> [d] Source

concatMap of f at x and g at y and h at z.