Skip to main content
4 of 4
saved 7 bytes
Arnauld
  • 197.6k
  • 20
  • 179
  • 649

JavaScript (ES6),  48  41 bytes

Expects a list of digits. Returns a Boolean value.

a=>a.map(d=>i-=d%7?1:i%7-6?2:.1,i=17)&&!i

Try it online!

How?

We use a syllable counter \$i\$ initialized to \$17\$, subtract either \$1\$ or \$2\$ from \$i\$ after each digit and check whether we end up with \$i=0\$. The haiku is supposed to look like that:

17 16 15 14 13
12 11 10 09 08 07 06
05 04 03 02 01

When the digit is either \$0\$ or \$7\$ and \$i\equiv 6\pmod 7\$, we have an invalid hyphenation and subtract \$1/10\$ from \$i\$ instead of \$2\$. Because this test can only be triggered once, \$i\$ remains a non-integer value whatever happens next.

Arnauld
  • 197.6k
  • 20
  • 179
  • 649