Advertisement
Guest User

Untitled

a guest
Nov 6th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun preveri(x, y) = if(String.size(x) > String.size(y)) then x else y
  2. val l = ["aaa", "aaaaaa", "bb", "aaaa"]
  3.  
  4. fun best_string(f, xs: string list) = List.foldl f "" xs
  5.  
  6. best_string(preveri, l)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement