dedbox
2017-12-18 18:09:15

@dedbox has joined the channel


targetstorm
2017-12-18 19:22:49

@targetstorm has joined the channel


shu--hung
2017-12-18 19:23:01

@shu—hung has joined the channel


slack1
2017-12-19 07:23:26

Do people tend to use fold in a way where the accumulator variable is a hash or has multiple values?


notjack
2017-12-19 07:23:59

@slack1 not typically, but it’s not unheard of


notjack
2017-12-19 07:24:14

for/fold is somewhat more common for that


slack1
2017-12-19 07:24:42

Nuuu hehe


slack1
2017-12-19 07:24:48

I am waiting for that one to update


slack1
2017-12-19 07:24:57

I hear it will update soon


lexi.lambda
2017-12-19 07:25:32

fwiw, for/fold (the existing version) is still strictly more powerful than foldl / foldr


lexi.lambda
2017-12-19 07:25:41

so I’m not sure what you mean by “waiting for it to update”


slack1
2017-12-19 07:25:52

I don’t want to return multiple values on the last iteration


slack1
2017-12-19 07:26:01

since it’s hard to handle multiple values in general


lexi.lambda
2017-12-19 07:26:15

foldl and foldr don’t support multi-valued accumulators


lexi.lambda
2017-12-19 07:26:20

but you can just use a list as a tuple


slack1
2017-12-19 07:26:28

I mean for/fold and something like #:finally


slack1
2017-12-19 07:26:57

Otherwise I have to return multiple values, am I wrong?


notjack
2017-12-19 07:26:59

ah right that #:return keyword or whatever it is


notjack
2017-12-19 07:27:19

#:result



lexi.lambda
2017-12-19 07:27:29

you do have to return multiple values, but you could just ignore the values you don’t care about


slack1
2017-12-19 07:27:41

You mean like in a let-values?


lexi.lambda
2017-12-19 07:27:44

yes


slack1
2017-12-19 07:29:14

mm thanks I shall try it out