Add a function to iterate Maybe-valued functions
Add a function to iterate Maybe-valued functions

Add a function that iterates a function of type `a -> Maybe a`
in the sense of the Maybe monad until nothing is obtained. The
last Just value is not dropped. (This differs from the
semantics of iterateOk.)

Signed-off-by: Klaus Aehlig <4ce51de36d9068cd7db2eec1151e0f3f95419008@google.com>
Reviewed-by: Helga Velroyen <2d0126b1ec6f9ec5cbec4a7012aa14faeaef10f5@google.com>

andir/ganeti,mbakke/ganeti,ganeti/ganeti,ganeti/ganeti,leshchevds/ganeti,leshchevds/ganeti,mbakke/ganeti,leshchevds/ganeti,andir/ganeti,onponomarev/ganeti,onponomarev/ganeti,mbakke/ganeti,andir/ganeti,ganeti/ganeti