Whoops! You've just 70-649 run into a programming concept known as types. Types are a feature of many programming languages which are designed to catch some of your programming errors early on so that you find out about them before it's too late. We'll discuss types in more detail later on in the , but for now it's useful to think in terms of plugs and connectors. For example, many of the plugs on the VCP-310 back of your computer are designed to have different shapes and sizes for a purpose. This is partly so that you don't inadvertently plug the wrong bits of your computer together and blow something up. Types serve a similar purpose, but in this particular example, well, types aren't so helpful.
The tricky bit here is that numbers like 25 can either be interpreted as being Double or Integer (among VCP-101V other types)... but for lack of other information, Haskell has "guessed" that its type must be Integer (which cannot be multiplied with a Double). To work around this, we simply insist that it is to be treated as a Double
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment