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 dlugosc l suma =
- match l with
- | [] -> suma
- | x::xs -> dlugosc xs suma+1
- let rec krotnosc x ys ilosc=
- match ys with
- | [] -> ilosc
- | ysh::yst -> if ysh = x then krotnosc x yst ilosc+1
- else krotnosc x yst ilosc
- let rec powtorzenia l1 l2 =
- match l1 with
- | [] -> l2
- | x::xs -> if
- [<EntryPoint>]
- let main argv =
- let l = [2; 4; 5; 6; 2; 9; 10];
- //printfn "%A" (dlugosc l 0);
- //printfn "%A" (krotnosc 2 l 0);
- 0 // return an integer exit code
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement