2 ms·
What's so awkward about multi line lambdas? You can achieve them in the same way you can in JavaScript, can't get easier than that. import sequtils le
by dom96 5y ago
What's so awkward about multi line lambdas? You can achieve them in the same way you can in JavaScript, can't get easier than that.
import sequtils
let x = [1,2,3,4,5]
echo x.map(
proc (num: int): int =
num*2
)
- throwaway234272 5y agoThe lambdas are terrible in nim, you currently have to `import sugar` for bandaid fix. Nim is in progress to fix them, see here: https://github.com/nim-lang/Nim/pull/11992 https://github.com/nim-lang/Nim/pull/11992 I don't see why people can't admit to shortcomings in languages? I like Nim a lot, doesn't mean I'm blind to where it falls short or needs improvement...