1 2 3 4
let rec removeFirst elements value = match elements with | [] -> [] | head::tail -> if head = value then tail else head::removeFirst tail value
You can clone a snippet to your computer for local editing. Learn more.