by dmit·10y ago·view on hn ↗Here's a more or less faithful translation of the first solution to JavaScript:https://jsfiddle.net/zhrpm8su/2/