Global Feed Post Login
Replying to Avatar jb55

foldl’ seems simpler to me but whatever

Avatar
Oriel Jutty :hhHHHAAAH: 1y ago 💬 1

nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub18nexvs44uwvzhjlp3x3ua3f4n8npw45krta6nv9u5rkddecwnfqqlu2mm9

How is

foldl' (\acc _ -> f acc) x [1 .. n]

simpler than

iterate f x !! n

?

Reply to this note

Please Login to reply.

Discussion

Avatar
jb55 1y ago

!! is horrific imo

Thread collapsed