# [Haskell], <s>33</s> 30 bytes <!-- language-all: lang-hs --> f a=until(`notElem`a)succ$a!!0 [Try it online!][TIO-j57wmpms] [Haskell]: https://www.haskell.org/ [TIO-j57wmpms]: https://tio.run/##Zc07DsIwEATQnlNsJCQnUgoukJIaASVCinFsYuJPiG3xubwZEA2keM3saqbnYZDG5KyIN8lFbcrW@bg20ra8CkmIJS@KVbZcO2qo8wuicdIuUqnowDir2QkEdKDYsfr92CDdwg72s@sd6XOW/rfKT3PNztCDhgsMYMCCAw8jXGGCABES3OC99vgu5hc "Haskell – Try It Online"