Simple-sounding question here. I'm trying to use patterns to make "spicy" lists.
The following example is maybe a bit weird, but you don't have to worry about the details. Let's say I create a pattern:
toScale [0, 2, 5] (fromIntegral <$> round <$> segment 12 (range 1 14 $ abs (sine * (fast 2 $ sine))))
.
This pattern maps time to values:
(0>1/12)|26
(1/12>⅙)|48
(⅙>¼)|41
(¼>⅓)|14
(⅓>5/12)|2
(5/12>½)|12
(½>7/12)|17
(7/12>⅔)|12
(⅔>¾)|2
(¾>⅚)|2
(⅚>11/12)|2
(11/12>1)|5
How does one create a list out of the values?
I'm expecting a list with 12 elements, [26, 48, 41, 14, 2, 12, 17, 12, 2, 2, 2, 5]
.
I've tried putting square braces around the pattern, but that creates a list of patterns--not what i'm after. I tried appending :: [Double]
and some other things and searches but no luck.