Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let rec parzyste(lista: 'a list) =
- match lista.Length with
- | 0 -> []
- | _ -> if(lista.Length % 2 = 0) then lista.Head::parzyste(lista.Tail)
- else parzyste(lista.Tail)
- let lista = ["zero","jeden","dwa","trzy","cztery","piec"];
- let wynikowa = parzyste(lista);
- [<EntryPoint>]
- printf "%A" wynikowa
- 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement