ndmitchell / extra

Extra Haskell functions
Other
93 stars 37 forks source link

Add (!?) function for lists #84

Closed Boarders closed 3 years ago

Boarders commented 3 years ago

It would be nice for this function:

(!?) :: [a] -> Int -> Maybe a

to exist in a convenient place. Would you consider adding it to extra?

Boarders commented 3 years ago

I am happy to make a PR doing this, I just wanted to run it past you first.

Boarders commented 3 years ago

I added a PR for this here: https://github.com/ndmitchell/extra/pull/85. If for whatever reason you don't like idea then no worries!

ndmitchell commented 3 years ago

Fixed in #85