Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type litera = bool;;
- type dane_slow = Puste | Krotkie of litera | Srednie of litera | Dlugie of litera;;
- let informacje symbol list= List.map(function n->
- match n with
- | n when (String.length n > 20) -> Dlugie(String.contains n symbol)
- | n when (String.length n > 10) -> Srednie(String.contains n symbol)
- | n when (String.length n > 0) -> Krotkie(String.contains n symbol)
- | n -> (Puste)
- )(list)
- informacje 'a' ["AAAAAAAAAAAAAAAAAAAAA";"ba";"cecececececece";""] ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement