Skip to content

Instantly share code, notes, and snippets.

@klonk
Created June 11, 2012 19:09
Show Gist options
  • Save klonk/2912025 to your computer and use it in GitHub Desktop.
Save klonk/2912025 to your computer and use it in GitHub Desktop.
merge::[(Int,Int)]->[(Int,Int)]
merge xs = [(c,d)| (c,_)<-xs , d <- [sum ( [z| (c,z)<-xs])]]
klonk@qip.ru (21:06:42 11/06/2012)
:) a chcem , aby ked mam dvojcu , tak pre kazde to c vo dvojici , mi spocitalo vsetky prvky z druheho
klonk@qip.ru (21:07:19 11/06/2012)
[(1,2),(1,6),(2,8)] = [(1,8),(2,8)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment