jtdaugherty/vty-ui — pull request #58 by markus1189 (2014-12-21 18:18:13+00:00)
Title: List: Add listFind*By functions.

Hi,

I recently needed an alternative way to use `listFind{First,All}` without using the standard `Eq` instance.

I noticed that the common `*By` functions were not present so I added:

```haskell
-- |Find the first index in the list for which the predicate is true.
-- If no item in the list matches the given predicate, return Nothing.
listFindFirstBy :: (a -> Bool) -> Widget (List a b) -> IO (Maybe Int)

-- |Find all indices in the list matching the given predicate.
listFindAllBy :: (a -> Bool) -> Widget (List a b) -> IO [Int]
```

[![24pullrequests](http://24pullrequests.com/assets/logo-625222452ffc0d57272decb6f851a7fe.png)](http://24pullrequests.com)

Happy Holidays,
Markus