Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- open Char
- let voyelle c =
- match lowercase c with
- | 'a' | 'e' | 'i' | 'o' | 'u' | 'y' -> true
- | _ -> false
- let consonne c =
- match lowercase c with
- | 'a' .. 'z' when not (voyelle c) -> true
- | _ -> false
- let soc c =
- String.make 1 c
- let swe_of_fr c =
- if (consonne c) then (soc c)^"o"^(soc (lowercase c)) else (soc c)
- let rajkcqoinoqeiufbi s =
- let rec loop ns i =
- if i < String.length s then loop (ns^(swe_of_fr s.[i])) (i+1) else ns
- in loop "" 0
Advertisement
Add Comment
Please, Sign In to add comment