
Hello,
I've got (not that short):
conv :: Music_Data_ -> (Maybe Note, Maybe Direction, Maybe Sound)
conv (Music_Data_1 n) = (Just n, Nothing, Nothing)
conv (Music_Data_4 d) = (Nothing, Just d, Nothing)
conv (Music_Data_9 s) = (Nothing, Nothing, Just s)
sortOutMusicData :: [Music_Data_] -> ([Note],[Direction],[Sound])
sortOutMusicData d = catMaybes3 $ unzip3 $ map conv d
catMaybes3 (a,b,c) = (catMaybes a, catMaybes b, catMaybes c)
Cordialement,
Corentin DUPONT (SII)
CDL AL4/AT8 et Comelec
DTI/DPMO/CSEE/CLCO/LCTL
Tel: +33 (0) 1 56 47 65 38 / 47 65 38
corentin.dupont@ext.mpsa.com
Michael Mossey