Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let natrzy list=
- let rec help_natrzy (list, mod5List, mod10List, otherList) =
- match list with
- [] -> (mod10List, mod5List, otherList)
- | mod10 when List.hd list mod 10 = 0 -> help_natrzy (List.tl list, mod5List, mod10List@List.hd list::[], otherList)
- | mod5 when List.hd list mod 5 = 0 -> help_natrzy (List.tl list, mod5List@List.hd list::[], mod10List, otherList)
- | _ -> help_natrzy (List.tl list, mod5List, mod10List, otherList@List.hd list::[])
- in help_natrzy (list, [], [], []);;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement