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

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

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×