yairchu
07/14/2019, 12:03 PMsum
, fold
wants a “binary operator” function that takes two parameters - an “accumulator” and an “item”. In Haskell, which is based on positional arguments, I’d simply pass the operator “+”. But in Lamdu I can’t because the parameters of “+” are not called “accumulator” and “item”. So instead I use a lambda which uses “+”. However it gets sugared as a “lightweight lambda”, with underlines under the lambda symbol and under its parameters where used. This isn’t too heavyweight and it also gives us helpful places to display the intermediate values of everything (when display of evaluation results is enabled)Nick Smith
07/14/2019, 12:14 PMyairchu
07/14/2019, 12:18 PMyairchu
07/14/2019, 12:36 PMNick Smith
07/14/2019, 12:48 PMNick Smith
07/14/2019, 12:50 PMyairchu
07/14/2019, 12:52 PMNick Smith
07/14/2019, 12:55 PMNick Smith
07/14/2019, 12:56 PMyairchu
07/14/2019, 12:57 PMDrewverlee
07/14/2019, 10:37 PMDrewverlee
07/14/2019, 10:38 PMDrewverlee
07/14/2019, 10:40 PMDrewverlee
07/14/2019, 10:40 PM