fromMaybes

From TidalCycles userbase
Jump to: navigation, search
This page contains changes which are not marked for translation.


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