Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Learn more about F# at http://fsharp.org
- // See the 'F# Tutorial' project for more help.
- let rec sum'' xs =
- match xs with
- | [] -> 0
- | hd::tl -> hd + sum'' tl
- let sum' xs =
- let rec loop xs' acc =
- match xs' with
- | [] -> acc
- | hd::tl -> loop tl (hd+acc)
- match xs with
- | [] -> 0
- | hd::tl -> loop tl hd
- [<EntryPoint>]
- let main argv =
- printfn "%A" argv
- 0 // return an integer exit code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement