Skip to main content
1 of 2
Anders Kaseorg
  • 40.1k
  • 3
  • 75
  • 146

Haskell, 33 bytes

f(a:b)=filter(`notElem`b)[a..]!!1

Try it online!

Anders Kaseorg
  • 40.1k
  • 3
  • 75
  • 146