TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Checking the Collatz conjecture using only TypeScript's type system

4 pointsby robbieoover 5 years ago

1 comment

SilasXover 5 years ago
Interesting! Two questions:<p>1) Could you maybe simplify the computational effort by defining &quot;divide by 2&quot; instead of general division, since you only ever divide by 2 for Collatz?<p>2) The author concludes by explicitly checking each integer. Given the power of types, isn&#x27;t there a single statement you can make that would prompt it to check all integers, i.e. seeing if it can prove that all integers type-check?
评论 #21757154 未加载