Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here's why OCaml falls in the category “values are immutable”:
- lolcathost% ocaml
- OCaml version 4.02.3
- # let x = 5;;
- val x : int = 5
- # let f y = x + y;;
- val f : int -> int = <fun>
- # let x = 0;;
- val x : int = 0
- # f 10;;
- - : int = 15
- Here's why Clojure falls in the category “anything goes”:
- lolcathost% clojure
- Clojure 1.8.0
- user=> (def x 5)
- #'user/x
- user=> (defn f [y] (+ x y))
- #'user/f
- user=> (def x 0)
- #'user/x
- user=> (f 10)
- 10
- user=>
- Here's why Racket in the REPL also falls in the category “anything goes”:
- lolcathost% racket
- Welcome to Racket v6.4.
- > (define x 5)
- > (define (f y) (+ x y))
- > (define x 0)
- > (f 10)
- 10
- >
Advertisement
Add Comment
Please, Sign In to add comment