HPM Education - Haskell

Searchβ¦

Introduction

Types in Haskell

Defining Functions / Working with Functions

List Comprehensions

Higher-order Functions

Cutom Types

Type Classes

Interactive Programming

Functors, Applicatives and Monads

Num β Numeric Types

The

`Num`

class supports basic numeric methods for its types:(+), (-), (*) :: a -> a -> a

negate, abs, signum :: a -> a

Notice that division is not included here because of how it is handled differently for integers floating-point numbers, as we will see in the next two classes (

`Integral`

and `Fractional`

). The `signum`

method returns the sign of a number (-1 for negative numbers and 1 for positive ones).Last modified 1yr ago

Copy link