Skip to content

Instantly share code, notes, and snippets.

View aluink's full-sized avatar

Eric Polino aluink

  • Nurx / Thirty Madison
  • Chattanooga, TN
View GitHub Profile
@aluink
aluink / MergeList1.hs
Created October 5, 2012 20:29 — forked from snluu/MergeList1.cs
In Haskell
merge :: Ord a => [a] -> [a] -> [a]
merge [] l2 = l2
merge l1 [] = l1
merge xx@(x:xs) yy@(y:ys) = if x < y then x : merge xs yy
else y : merge xx ys