It looks like you're new here. If you want to get involved, click one of these buttons!

- All Categories 2.3K
- Chat 499
- Study Groups 17
- Petri Nets 8
- Epidemiology 3
- Leaf Modeling 1
- Review Sections 9
- MIT 2020: Programming with Categories 51
- MIT 2020: Lectures 20
- MIT 2020: Exercises 25
- MIT 2019: Applied Category Theory 339
- MIT 2019: Lectures 79
- MIT 2019: Exercises 149
- MIT 2019: Chat 50
- UCR ACT Seminar 4
- General 67
- Azimuth Code Project 110
- Statistical methods 3
- Drafts 2
- Math Syntax Demos 15
- Wiki - Latest Changes 3
- Strategy 113
- Azimuth Project 1.1K
- - Spam 1
- News and Information 147
- Azimuth Blog 149
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 707

Options

*Functions in mathematics and Haskell.*

Suppose \(f : Int \to Int \) sends an integer to its square, \(f(x) := x^2 \) and that \(g : Int \to Int \) sends an integer to its successor, \(g(x) := x+ 1\).

(a) Write \(f \) and \(g \) in Haskell, including their type signature and their implementation.

(b) Let \(h := f◦g \). What is \(h(2) \)?

(c) Let \(i := f ; g \). What is \(i(2) \)?

hello world×