10. Who’s on First?
In this problem, you’re asked to enter your own APL function, without giving it any arguments. Your function will be checked by the APL Challenge system using several tests to see whether it is correct.
Remember how we used round brackets in problem 3 to create lists of lists of lists. In fact, you can put any expression inside round brackets to create a list of expression results. For example, (2×3) (4+5) gives 6 9is a list of two numbers:
6from2×39from4+5
Using the techniques you have learnt so far, write a function that takes an uppercase word as its right argument and gives a two-letter text where the first letter is the word’s first vowel and the second letter is the word’s first consonant. For example:
{answer} 'SPHRAGISTIC'
AS
{answer} 'SEAL'
ES
{answer} 'EAGER'
EG
The given word will have at least one vowel and one consonant. Use 'AEIOU' as your list of vowels.