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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Atomic, Composable Financial Transactions: The Power of Haskell's Purity and ADT

5 点作者 clusterfoo大约 10 年前

1 comment

clusterfoo大约 10 年前
From a discussion in &#x2F;r&#x2F;rust. Great overall discussion about the benefits of Haskell-like abstractions. This example almost looks like magic, it really helped me understand the power of these abstractions.<p>Often people (including myself), will ask &quot;why bother&quot;, &quot;why should I get a PhD in abstract math just to write a damn script. They&#x27;re all turing complete languages after all.&quot;<p>Here is a perfect, down to earth example! So simple even I got it!<p>p.s: Not being a Haskell guy, I had to use these resources to figure out wtf was going on; they might help you too:<p>- explains Functor: <a href="http:&#x2F;&#x2F;en.wikibooks.org&#x2F;wiki&#x2F;Haskell&#x2F;The_Functor_class" rel="nofollow">http:&#x2F;&#x2F;en.wikibooks.org&#x2F;wiki&#x2F;Haskell&#x2F;The_Functor_class</a><p>- explains Monad: <a href="http:&#x2F;&#x2F;en.wikibooks.org&#x2F;wiki&#x2F;Haskell&#x2F;Understanding_monads" rel="nofollow">http:&#x2F;&#x2F;en.wikibooks.org&#x2F;wiki&#x2F;Haskell&#x2F;Understanding_monads</a><p>- explains retry: <a href="http:&#x2F;&#x2F;chimera.labs.oreilly.com&#x2F;books&#x2F;1230000000929&#x2F;ch10.html#sec_stm-block-until-changes" rel="nofollow">http:&#x2F;&#x2F;chimera.labs.oreilly.com&#x2F;books&#x2F;1230000000929&#x2F;ch10.htm...</a>