Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open System
- [<EntryPoint>]
- let main argv =
- let rec sum list =
- match list with
- | head::tail -> if head>0 then 1+ (sum tail) else (sum tail)
- | [] -> 0
- let sp = [1..5]
- printfn "%A\n" (sum sp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement