Guest User

Untitled

a guest
Jun 19th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. mew 4 u
  2.  
  3. Integers in Mew are as you would expect - just integers. Type one into the REPL and it'll spit it straight back out.
  4.  
  5. > 1
  6. 1
  7.  
  8. The same goes for floats.
  9.  
  10. > 1.0
  11. 1
  12.  
  13. And if you're in any doubt as to which is which, you can ask.
  14.  
  15. > type 1
  16. .integer
  17. > type 1.0
  18. .float
  19.  
  20. From which we can deduce that function application in Mew is prefix. No, really:
  21.  
  22. > type (+ 1 1.0)
  23. .float
  24.  
  25. And that operations on integers and floats cast upwards. Oh, and brackets denote precedence. As usual.
Add Comment
Please, Sign In to add comment