Objective
From Wikipedia :
A recursive acronym is an acronym that refers to itself in the expression for which it stands.
Your goal is to check if a string is a recursive acronym.
- The acronym is the first word
- Words are not case sensitive, separated with a single space.
- The given string does not contain any punctuation nor apostrophe.
- Only the first letter of each word can be part of the acronym.
You must also give the function words. For simplicity, every word can be considered as a function word.
Example
f("RPM Package Manager") => { true, [] }
f("Wine is not an emulator") => { true, ["an"] }
f("GNU is not Unix") => { true, ["is"] }
f("Golf is not an acronym") => { false }
f("X is a valid acronym") => { true, ["is","a","valid","acronym"] }
You can give a full program or a function.
The input string can be taken from STDIN or as a function argument.
Output result can be true/false, 0/1, yes/no...
The function words list (any format of list is valid) must be given if and only if this is a recursive acronym (even if the list is empty). You do not have to preserve capitalization of the function words.
Winning criteria
This is a code-golf, shortest code wins.