Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

More Functions

Exercise 1

def sum(a: Int, b: Int) = a + b

Create a partial applied function for sum Create also a function sum and a partial Create a curried version of sum

Exercise 2

Try to write a fromCurry and toCurry yourself without looking at example above

Exercise 3

Create a partial function on Int's the works on odd numbers and returns a multiplication by 10

Exercise 4

Create a partial function on Int's the works on odd numbers and returns a multiplication by 10 Use it on a list List(1,2,3,4,5,6,7,8,9)

Use collect, filter and map