Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. let increment n = n+1;;
  2.  
  3. let x = increment -5;;
  4.  
  5. let x = increment -5;;
  6. ^^^^^^^^^
  7. Error: This expression has type int -> int
  8. but an expression was expected of type int`
  9.  
  10. let increment n = n + 1
  11. let x = increment @@ -5
  12.  
  13. let increment n = n + 1
  14. let x = -5 |> increment
  15. let clamp x low high = x |> min high |> max low
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement