Add element to end of tuple list in Haskell -


im new in haskell , try add element end of tuple list

for example:

[(1,2,3),(2,3,4)] want add (3,4,5) . [(1,2,3),(2,3,4),(3,4,5)]

adding end of list inefficient can use ++:

[(1,2,3),(2,3,4)] ++ [(3,4,5)] 

if need keep adding end of collection use data.sequence instead:

import data.sequence (fromlist [(1,2,3),(2,3,4)]) |> (3,4,5) 

Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -