3 ms·
I have been interested in OCaml for a while, and this is a nice piece. One question, though - some of the examples start like this: - : Is that the prompt fro
by vosper 12y ago
I have been interested in OCaml for a while, and this is a nice piece. One question, though - some of the examples start like this:
- :
Is that the prompt from the OCaml REPL (does OCaml have a REPL)?
EDIT: I think I misread things - it's the output from the examples that has the "- :" prefix, so I'm guessing it is REPL output.
- arthurcolle 12y ago# let x = 5;; val x : int = 5 # that's what the REPL looks like on my end
- gnuvince 12y agoThat's what the prompt answers back. # 3;; - : int = 3 # fun x -> x*x;; - : int -> int = <fun>
- deleted 12y ago[deleted]
- mads_hartmann 12y agoThe grey boxes are the input to the REPL. You should be able to just copy paste the contents of any of the boxes. The green boxes are the output of the REPL.
- yawaramin 12y agoYou can think of '-' as meaning 'the last evaluated expression' and ':' as meaning 'has the type'. So the OCaml repl replies to your input by saying something like 'the last evaluated expression has the type ...'.