f:num -> num; f(n) <= n*(n+1);This defines a function called

`f`

of type `num -> num`

This means it takes a number and returns a number. If we give our function `f`

the value `n`

it will give us back `n*(n+1)`

Try inputting

f(3);

Hope replies:

>> 12 :num

Because `f(3)`

`3*(3+1)`

`3*4`

`12`

.

s.danicic@gold.ac.uk

Sebastian Danicic BSc MSc PhD (Reader in Computer Science)

Dept of Computing, Goldsmiths, University of London, London SE14 6NW

Last updated 2010-12-29