fromMaybes

From TidalCycles userbase
Revision as of 19:44, 24 December 2020 by Left adjoint (talk | contribs) (Created page with "<languages/> <translate> <!--T:1--> {{DISPLAYTITLE:fromMaybes}} Type: <source inline>fromMaybes :: [Maybe a] -> Pattern a</source> <!--T:2--> '''fromMaybes...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Type: fromMaybes :: [Maybe a] -> Pattern a

fromMaybes is much like listToPat but when it encounters a Nothing it puts a gap in the pattern and when it encounters Just x puts x in the pattern.

d1 $ n (fromMaybes [Just 0, Nothing, Just 2]) # s "superpiano"

is equivalent to

d1 $ n "0 ~ 2" # s "superpiano"

See also: listToPat,fromList