Slightly silly answer: Could you be doing it...
It certainly works in theory:
Explanation:
Relatively new user here, so please inform me of any formating issues or other problems.
@Sherlock9 Right now we consider "classes" as a type, and types are basically categories (which class are you?). Dependent types is more granular. While we still have classes, we also are able to add additional information about a type at compile time. For example, we can add "This integer is not zero"-> NonZero. If we have a NonZero Integer, then we know when we do integer division, that it won't ever produce a divide by zero error
Inspired by four other puzzles, how could it be possible that adding 22 to 4 gives 9999? What is the correct way to do it?
As with all of the other puzzles, consider these numbers in base 10.
f=a=>{for(i=o=[],q=c=a[0];++i<a.length+1;c=a[i])if(c+1!=a[i])o.push([q,c]),q=a[i];alert(o)};f([1,2,3,6])
f=a=>{a.push('a'),o=[],q=c=a[0];for(i of a.slice(1)){if(c+1!=i)o.push(q,c),q=i;c=i}alert(o)};f([1,2,3,6])