Skip to content

Instantly share code, notes, and snippets.

/f.p6

Created September 4, 2017 05:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/fc6f6a3e4968e1ce59f4a823549b360a to your computer and use it in GitHub Desktop.
sub conj(Str $λ, Str $f where 'pol'|'neg'|'par'|'pef'|'pot'|'con'|'vol') {
given $f {
when 'pol' {
(given $λ {
when s/ 'う'$ / '' / {$_}
when s/ 'つ'$ / '' / {$_}
when s/ 'く'$ / '' / {$_}
when s/ 'ぐ'$ / '' / {$_}
when s/ 'ぶ'$ / '' / {$_}
when s/ 'む'$ / '' / {$_}
when s/ 'す'$ / '' / {$_}
when s/ ['い'|'え']'る'$ / / {$_}
when s/ 'する'$ / '' / {$_}
when s/ 'くる'$ / '' / {$_}
when s/ 'る'$ / '' / {$_}
}
) ~ 'ます'
}
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment