haskell - Why does the operator ** fail where the operator ^ works? -


So, here are two lists that understand, first uses ^ while the other uses < Code> ** :

  & gt; [X ^ 2 | X & LT; - [1..10], weird x] [1,9, 25, 49,81] & gt; [X ** 2 | X & LT; - [1..10], weird x] & lt; Interactive>: 9: 1: Any examples arising from the use of printing (Show T0) type variable ???? TA ???? Note: There are several possible examples: Show example twice - defined in GHC. Floatio Example showing float - defined GACC. Example (see Integral A, A) = & gt; Show (GHC.RialArtioA) - Define GACC. In real ... plus 23 other interactive GHCI commands in an STMT: Print it   

As far as I know the difference between two operators is that with integers first Works, while the second floating works with point value, exactly the expected output:

  [1.0.0.0.0, 25.0, 49.0, 0.81.0]   

The real question is why does the understanding of the second list fail?

As you say that ** works with floating ponits Although it works with weird only integral s, so understanding of your second list works only with types that are both floating and Examples of integral and such type are not present.

While I'm not sure why error message claims that there are 26 possible examples, when no one does mention it, then really meets the necessary obstacles.

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -