TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Evolution of a Haskell Programmer (2001)

144 点作者 agomez314大约 1 年前

11 条评论

tromp大约 1 年前
Church Numeral oriented Haskell Programmer:<p><pre><code> three = \f x -&gt; f (f (f x)) fac = \n f -&gt; n (\f n -&gt; n (f (\f x -&gt; n f (f x)))) (\x -&gt; f) (\x -&gt; x) main = print $ fac three (+ 1) 0</code></pre>
GuB-42大约 1 年前
As a C programmer, I think it is missing something like<p><pre><code> -- works for all 32-bit integers fac n = [1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600]!!n</code></pre>
评论 #39619006 未加载
VMG大约 1 年前
<a href="https:&#x2F;&#x2F;archive.is&#x2F;CbAXN" rel="nofollow">https:&#x2F;&#x2F;archive.is&#x2F;CbAXN</a> for those that get a cert error
Vosporos大约 1 年前
&quot;fac n = product [1..n]&quot; is still something I use at times. It&#x27;s a beautiful line of code.
评论 #39614539 未加载
ykonstant大约 1 年前
I have a similar list of FizzBuzzes in Lean from when I started programming in that language:<p><a href="https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;1lPnQiik5cAx0X2E3GNbw_Oaug87FNIOi&#x2F;view?usp=sharing" rel="nofollow">https:&#x2F;&#x2F;drive.google.com&#x2F;file&#x2F;d&#x2F;1lPnQiik5cAx0X2E3GNbw_Oaug87...</a><p>I wrote more, but it got too silly.
osclarto大约 1 年前
I&#x27;m glad I don&#x27;t work with any post-doc Haskell programmers
评论 #39615981 未加载
quickthrower2大约 1 年前
There is a Y Combinator in there!
jayceedenton大约 1 年前
My first thought was, &quot;Needs more monads&quot;.<p>Sure enough, in the commentary:<p>&gt; Monads are woefully un-represented here; I would be grateful if someone could contribute a few (progressive) examples in the spirit of the development above.
jayceedenton大约 1 年前
&gt; fac n = product [1..n]<p>This is a beautiful line of code.<p>In all seriousness, I&#x27;d probably prefer to find the Junior or &quot;Another junior&quot; version if I was browsing a project.
tankfeeder大约 1 年前
Evolution of Picolisp coder. [<a href="https:&#x2F;&#x2F;git.envs.net&#x2F;mpech&#x2F;tankf33der&#x2F;raw&#x2F;branch&#x2F;master&#x2F;version.l" rel="nofollow">https:&#x2F;&#x2F;git.envs.net&#x2F;mpech&#x2F;tankf33der&#x2F;raw&#x2F;branch&#x2F;master&#x2F;vers...</a>]
评论 #39617805 未加载
Tabular-Iceberg大约 1 年前
The invalid certificate and the oddball text encoding is illustrative of the Haskell programmer&#x27;s inability to cope with practical computing problems.
评论 #39614672 未加载
评论 #39613783 未加载
评论 #39615111 未加载
评论 #39620358 未加载
评论 #39615482 未加载