Advertisement
Guest User

zad.1 lista.6

a guest
Nov 21st, 2016
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. type litera = bool;;
  2. type dane_slow = Puste | Krotkie of litera | Srednie of litera | Dlugie of litera;;
  3.  
  4. let informacje symbol list= List.map(function n->
  5. match n with
  6. |   n when (String.length n > 20) -> Dlugie(String.contains n symbol)
  7. |   n when (String.length n > 10) -> Srednie(String.contains n symbol)
  8. |   n when (String.length n > 0) -> Krotkie(String.contains n symbol)
  9. |   n -> (Puste)   
  10.     )(list)
  11.     informacje 'a' ["AAAAAAAAAAAAAAAAAAAAA";"ba";"cecececececece";""] ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement