Advertisement
zzloss

DrugiMax

May 8th, 2019
1,775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.18 KB | None | 0 0
  1.  
  2. let rec drugimax l drugi =
  3. ( match l with
  4.     | [x] -> if(maxel l > x && drugi < x) then x else drugi
  5.     | h::t -> if(maxel l > h && drugi < h) then drugimax t h else drugimax t drugi
  6. );;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement