一个演示项目,用于练习在 JS 中使用 State 和 List monad。
实施和想法受到以下精彩文章的启发:
概述
该方案基本上解决了以下问题
send
+ more
------
money
等式,其中每个字母代表一个不同的数字。
怎么跑
# first install dependencies with
npm install
# then run
npm run-script solve
在我的机器上,输出看起来像
$ time npm run-script solve
> @ solve ...
> babel-node index.js
Solutions found:
[ [ 9567, 1085, 10652 ] ]
real 0m5.278s
user 0m4.490s
sys 0m0.737s