...
/Translating Pig Latin with Flatten and Reduce
Translating Pig Latin with Flatten and Reduce
Let's build a fascinating application that converts normal language to Pig Latin using 'map', 'mergeMap' and, 'reduce' operators from RxJS.
We'll cover the following...
Pig Latin is a silly pseudo language based on English. Translating an English sentence into Pig Latin is simple. Split each sentence into words and put each word through the following modifications:
-
Remove the first letter of each word: “Pig Latin” becomes “ig atin” (exception: ignore single-letter words)
-
Add the first letter removed in the previous step plus “ay” to the end of the word: "ig-pay atin-lay" ...