Skip to content

Instantly share code, notes, and snippets.

@jaroel
Created March 9, 2015 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaroel/e8f09d14b87b809dac15 to your computer and use it in GitHub Desktop.
Save jaroel/e8f09d14b87b809dac15 to your computer and use it in GitHub Desktop.
stationDepartures id sc=map (\(s1,list)->(stationName $ (stationMap $ system sc) Map.! s1,list)) ( Map.toList (Map.fromListWith (++) (map (\((s1,s2),(d,start,dur))->(s2,[start])) (Map.toList (Map.filterWithKey (\(s1,s2) _ ->s1==id) (Map.unions (List.map times (Map.elems $ schedule sc))))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment