KSP-0.1: A library with the kerbal space program universe and demo code
System.KSP.Auxiliary
Description
Synopsis
takeUntil :: (a -> Bool) -> [a] -> [a] Source
The function takeUntil takes a test function and a list of values. It returns all elements that do not pass the test function until it reaches the first one that passes the test function, otherwise it returns the empty list.
takeUntil
firstJust :: [Maybe a] -> Maybe a Source
firstJust returns of a list of Maybe values the first actual Just value or nothing if none is within the list.
firstJust
Maybe
Just