Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
10
Task/Variables/Haskell/variables-6.hs
Normal file
10
Task/Variables/Haskell/variables-6.hs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
dotProduct :: [Int] -> [Int] -> Int
|
||||
dotProduct ns ms = sum $ zipWith (+) ns ms
|
||||
-- Without the type signature, dotProduct would
|
||||
-- have a more general type.
|
||||
|
||||
foobar :: Num a => a
|
||||
foobar = 15
|
||||
-- Without the type signature, the monomorphism
|
||||
-- restriction would cause foobar to have a less
|
||||
-- general type.
|
||||
Loading…
Add table
Add a link
Reference in a new issue