Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Learn more about F# at http://fsharp.org
- open System
- let rec (^^) x y =
- match y with
- | 0 -> 1
- | _ -> x * (x^^(y-1))
- let rec suma (a, b) =
- match b with
- | 0 -> a
- | _ -> a + b + suma(a, (b-1))
- let tylkoMaleLitery (str:System.String) =
- str.ToLower() = str
- let rec mRn (m, n) =
- match n with
- | 0 -> 0
- | 1 -> m
- | _ -> m + mRn(m, n-1)
- let wystOdItego(str:System.String, i, ch, start) =
- match i with
- | str.Length -> start
- | _ -> start + wyst
- [<EntryPoint>]
- let main _ =
- printf "%A" <| wystOdItego("abcaa", 2, 'a')
- ignore (System.Console.ReadKey(true))
- 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement