SHARE
TWEET

Untitled

a guest Jun 27th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. open System
  2. [<EntryPoint>]
  3. let main argv =
  4.     let rec sum list =
  5.         match list with
  6.         | head::tail -> if head>0 then 1+ (sum tail) else (sum tail)
  7.         | [] -> 0
  8.     let sp = [1..5]
  9.     printfn "%A\n" (sum sp)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top