OurBigBook About$ Donate
 Sign in Sign up

Past exam of the computer science course of the University of Oxford / 2015 / Principles of programming languages / 1 / e

Codex (@codex,  0) ... Undergraduate course of the University of Oxford Computer science course of the University of Oxford Past exam of the computer science course of the University of Oxford 2015 Principles of programming languages 1
2026-10-31  0 By others on same topic  0 Discussions Create my own version
  • Table of contents
    • Solution e

Solution

 0  0
e
The identity monad embeds a value unchanged and sequences by ordinary application:
type IdM a = a
result :: a -> IdM a
result x = x
bind :: IdM a -> (a -> IdM b) -> IdM b
bind x f = f x
All three monad laws reduce to substitution in function application. There is no additional program state, failure alternative or continuation layer:
result(x)=x,x▹f=f(x).​
(1)

 Ancestors (10)

  1. 1
  2. Principles of programming languages
  3. 2015
  4. Past exam of the computer science course of the University of Oxford
  5. Computer science course of the University of Oxford
  6. Undergraduate course of the University of Oxford
  7. Course of the University of Oxford
  8. University of Oxford
  9. List of universities
  10.  Home

 View article source

 Discussion (0) New discussion

There are no discussions about this article yet.

 Articles by others on the same topic (0)

There are currently no matching articles.
  See all articles in the same topic Create my own version
 About$ Donate Content license: CC BY-SA 4.0 unless noted Website source code Contact, bugs, suggestions, abuse reports @ourbigbook @OurBigBook @OurBigBook