The original code works now

12:09 <diakopter> m: subset Greeting of Str where { /:i ^oh \s+ \w+ '!'?$/ }; 
                  subset LolGreeting of Str where { .words[1].lc eq 'hai' }; 
                  multi detect(Str) { "not a greeting" }; multi 
                  detect(Greeting) { "regular greeting" }; multi 
                  detect(LolGreeting) { "lol-greeting" }; say detect "OH HAI"
12:09 <camelia> rakudo-moar 61d231: OUTPUT«lol-greeting␤»

Reply via email to