3 ms·
In Haskell, `sum` adds a collection of numbers, i.e. instances of the Num typeclass: Prelude> sum ["a", "b"] <interactive>:4:1: error: • No instan
by antonvs 6y ago
In Haskell, `sum` adds a collection of numbers, i.e. instances of the Num typeclass:
Prelude> sum ["a", "b"]
<interactive>:4:1: error:
• No instance for (Num [Char]) arising from a use of ‘sum’
• In the expression: sum ["a", "b"]
In an equation for ‘it’: it = sum ["a", "b"]
You appear to be refuting a straw man.